CVE-2026-4861
Stack-Based Buffer Overflow in Wavlink WL-NU516U1 Remote CGI Function
Publication date: 2026-03-26
Last updated on: 2026-04-30
Assigner: VulDB
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| wavlink | wl-nu516u1_firmware | m16u1_v260227 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-119 | The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data. |
| CWE-121 | A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function). |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2026-4861 is a critical stack-based buffer overflow vulnerability found in the Wavlink NU516U1 USB Printer Server firmware version M16U1_V260227. It occurs in the function ftext of the /cgi-bin/nas.cgi component when processing HTTP POST requests.
The vulnerability arises because the function allocates a fixed-size buffer of 516 bytes to store incoming POST data but uses the Content-Length HTTP header value to determine how much data to read without checking if this length exceeds the buffer size.
An attacker can send a specially crafted HTTP POST request with an excessively large Content-Length value, causing the buffer to overflow. This overflow overwrites adjacent stack memory, including the return address, allowing the attacker to control the program's execution flow and potentially execute arbitrary code remotely.
Exploitation requires a valid session cookie and the device's default login password is "admin".
How can this vulnerability impact me? :
This vulnerability can have severe impacts including remote code execution on the affected device, which means an attacker can run arbitrary code with the privileges of the vulnerable service.
Successful exploitation can lead to system crashes, denial of service (causing the device to become unresponsive), or full compromise of the device, potentially allowing attackers to control the device remotely.
Since the device is a networked printer server, this could lead to unauthorized access to network resources, interception or manipulation of print jobs, or use of the device as a foothold for further attacks within the network.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by monitoring for unusual HTTP POST requests to the endpoint /cgi-bin/nas.cgi that contain an excessively large Content-Length header value exceeding the expected buffer size (516 bytes). Such requests may cause the device to crash or respond with HTTP 500 errors.
A detection approach involves sending a crafted HTTP POST request with a large Content-Length header and observing the device's response or crash behavior.
Example command using curl to test for the vulnerability:
- curl -v -X POST http://<device-ip>/cgi-bin/nas.cgi -H "Content-Length: 2032" --data-binary @large_payload.bin
Here, large_payload.bin is a file containing a payload larger than 516 bytes (e.g., repeated 'A' characters). A crash or HTTP 500 response indicates potential vulnerability.
Note that a valid session cookie and the default login password "admin" may be required to trigger the vulnerability.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include:
- Restrict access to the vulnerable device's management interface, especially the /cgi-bin/nas.cgi endpoint, to trusted networks only.
- Monitor network traffic for suspicious HTTP POST requests with abnormally large Content-Length headers targeting the device.
- Change the default login password from "admin" to a strong, unique password to prevent unauthorized access.
- If possible, disable or block HTTP POST requests to /cgi-bin/nas.cgi until a firmware update or patch is available.
Since the vendor has not responded to the disclosure, applying network-level protections and access restrictions are critical to reduce risk.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
The provided information does not specify any direct impact of this vulnerability on compliance with common standards and regulations such as GDPR or HIPAA.