CVE-2019-25387

6.1 MEDIUM

📋 TL;DR

This reflected cross-site scripting vulnerability in Smoothwall Express allows unauthenticated attackers to inject malicious JavaScript via crafted POST requests to the xtaccess.cgi endpoint. When victims visit a malicious link, attackers can execute arbitrary scripts in their browsers, potentially stealing session cookies or performing actions on their behalf. All users running the vulnerable Smoothwall Express version are affected.

💻 Affected Systems

Products:
  • Smoothwall Express
Versions: 3.1-SP4-polar-x86_64-update9
Operating Systems: Linux
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default installation and requires no special configuration to be exploitable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers steal administrator session cookies, gain full administrative access to the Smoothwall firewall, reconfigure firewall rules, intercept all network traffic, and establish persistent backdoors.

🟠

Likely Case

Attackers steal user session cookies, perform actions as authenticated users, redirect users to malicious sites, or deface web interfaces.

🟢

If Mitigated

With proper input validation and output encoding, malicious scripts are neutralized before execution, preventing successful exploitation.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: CONFIRMED
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploit code is publicly available on Exploit-DB (ID 46333), making this easily weaponizable by attackers with basic web skills.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Update to version 3.1-SP4-polar-x86_64-update10 or later

Vendor Advisory: http://www.smoothwall.org

Restart Required: Yes

Instructions:

1. Backup current configuration. 2. Download latest update from Smoothwall repository. 3. Apply update using Smoothwall's update mechanism. 4. Restart the Smoothwall service. 5. Verify the fix by testing the vulnerable endpoint.

🔧 Temporary Workarounds

Web Application Firewall (WAF) Rules

all

Deploy WAF rules to block malicious XSS payloads targeting xtaccess.cgi endpoint parameters

# Example ModSecurity rule: SecRule ARGS:EXT|ARGS:DEST_PORT|ARGS:COMMENT "@detectXSS" "id:1001,phase:2,deny,status:403"

Input Validation Filter

linux

Implement input validation to sanitize EXT, DEST_PORT, and COMMENT parameters before processing

# Example Perl sanitization: $param =~ s/[<>"']//g;

🧯 If You Can't Patch

  • Implement strict Content Security Policy (CSP) headers to prevent script execution from untrusted sources
  • Restrict access to xtaccess.cgi endpoint using network ACLs or authentication requirements

🔍 How to Verify

Check if Vulnerable:

Test by sending POST request to /cgi-bin/xtaccess.cgi with malicious payload in EXT, DEST_PORT, or COMMENT parameters and check if script executes in response

Check Version:

cat /var/smoothwall/main/version

Verify Fix Applied:

After patching, repeat the test with malicious payloads and verify scripts are properly encoded/neutralized in the response

📡 Detection & Monitoring

Log Indicators:

  • POST requests to /cgi-bin/xtaccess.cgi containing script tags or JavaScript in parameters
  • Unusual parameter values in EXT, DEST_PORT, or COMMENT fields

Network Indicators:

  • HTTP requests with suspicious script payloads in POST parameters
  • Multiple requests to xtaccess.cgi from single IP with varying parameters

SIEM Query:

source="web_logs" AND uri_path="/cgi-bin/xtaccess.cgi" AND (http_method="POST") AND (param_name="EXT" OR param_name="DEST_PORT" OR param_name="COMMENT") AND param_value MATCHES "[<>"'()]|script|javascript"

🔗 References

📤 Share & Export