Wavlink AC3000 wireless.cgi DeleteMac() buffer overflow vulnerability
A stack-based buffer overflow in the DeleteMac function of wireless.cgi allows an authenticated attacker to overwrite the return address and execute arbitrary commands. The overflow occurs because a user-controlled NVRAM value is copied without length checking into a fixed-size stack buffer.
Originally disclosed on Cisco Talos
A stack-based buffer overflow vulnerability exists in the wireless.cgi DeleteMac() 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 commands on the device, potentially leading to full compromise.
What the attacker needed
Authenticated access to the web interface; network access to the device
The fix
The report does not state a fix; the vendor said patches are being worked on, but the product is discontinued.
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=AddMac and a long name_list parameter to set the AccessControlName3 NVRAM variable to an oversized value.
- Send an HTTP POST request to wireless.cgi with page=DeleteMac and a delete_list parameter containing an index that references the oversized AccessControlName3 value.
- The DeleteMac function copies the oversized value into a stack buffer, overflowing it and overwriting the return address.
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 bug in a home router's web interface. When you send a request to delete a MAC address from a list, the router copies a stored list name into a small memory area without checking its length. If an attacker first adds a very long list name, the copy overflows and can overwrite the memory that tells the router what to do next, letting the attacker run their own commands.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.