Wavlink AC3000 internet.cgi set_add_routing() command injection vulnerabilities
The Wavlink AC3000 router's internet.cgi set_add_routing() function fails to sanitise several HTTP POST parameters before using them in a shell command, allowing an authenticated attacker to execute arbitrary OS commands. This can lead to full compromise of the device.
Originally disclosed on Cisco Talos
Multiple OS command injection vulnerabilities exist in the internet.cgi setaddrouting() 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
Root cause
The set_add_routing function takes user-supplied POST parameters and inserts them into a command string passed to popen without any sanitisation or validation.
Impact
An authenticated attacker could execute arbitrary commands on the device, potentially leading to full compromise.
What the attacker needed
Authentication to the web interface; Network access to the device
How it was found
- Log in to the router's web interface to obtain a valid session cookie.
- Send an HTTP POST request to internet.cgi with page=addrouting and include a malicious value in one of the vulnerable parameters (e.g., netmask, gateway, dest, custom_interface).
- The router executes the injected command with the privileges of the web server.
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 router has a web page where you can set up network routes. When you submit the form, the router runs a system command using the values you typed. Because it doesn't check those values, someone who is logged in can type extra commands that the router will run, giving them control of the device.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.