Wavlink AC3000 touchlist_sync.cgi main() arbitrary code execution vulnerability
The touchlist_sync.cgi binary on the Wavlink AC3000 router fails to authenticate requests and passes the unsanitised IP query parameter into a shell command, allowing an attacker to execute arbitrary commands. An attacker with network access can send a crafted HTTP request to run commands on the device.
Originally disclosed on Cisco Talos
An arbitrary code execution vulnerability exists in the touchlistsync.cgi main() functionality of Wavlink AC3000 M33A8.V5030.210505. A specially crafted HTTP request can lead to arbitrary code 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 IP parameter from the query string is inserted into a shell command via sprintf and popen without sanitisation, and the CGI binary lacks an authentication check.
Impact
An unauthenticated attacker with network access could execute arbitrary commands on the device, but only if the device is in Mesh Mode.
What the attacker needed
Network access to the device; device in Mesh Mode
The fix
The IP parameter should be validated and escaped before being used in a shell command, and the CGI binary should enforce authentication.
How it was found
- Send an HTTP request to the touchlist_sync.cgi endpoint with a query string that does not set getACL to 1.
- Include an IP parameter containing shell metacharacters and commands.
- The device must be in Mesh Mode for the vulnerable branch to execute.
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 runs a small web program that takes a value from the web address and uses it to build a system command without cleaning it first. Because the program also does not check whether the person is logged in, anyone who can reach the router on the network can insert extra commands and make the router run them.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.