Wavlink AC3000 wireless.cgi set_wifi_basic_mesh() buffer overflow vulnerability
A stack-based buffer overflow exists in the set_wifi_basic_mesh function of the wireless.cgi binary on Wavlink AC3000 routers. An authenticated attacker can send a crafted HTTP request with an overly long SSID2G parameter to overwrite the return address and potentially execute arbitrary code.
Originally disclosed on Cisco Talos
A stack-based buffer overflow vulnerability exists in the wireless.cgi setwifibasicmesh() functionality of Wavlink AC3000 M33A8.V5030.210505. A specially crafted HTTP request can lead to arbitrary command execution.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
An authenticated attacker could execute arbitrary code on the router, potentially leading to full compromise.
What the attacker needed
Valid session cookie (authenticated)
The fix
The vendor should add length validation for the SSID2G parameter before copying it to the stack buffer.
How it was found
- Log in to the router's web interface to obtain a valid session cookie.
- Send an HTTP POST request to wireless.cgi with page=basicMesh and a long SSID2G parameter.
- The SSID2G value is copied to the stack without length checking, overwriting the return address.
- Control flow is redirected, potentially executing arbitrary code.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
This report describes a memory corruption bug in a router's web interface. When the router processes a form field called SSID2G, it copies the value into a fixed-size memory area without checking length. If the value is too long, it spills over and overwrites the return address, which tells the program where to go after finishing the function. An attacker who is logged in can exploit this to run their own code on the router.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.