Wavlink AC3000 touchlist_sync.cgi touchlistsync() command injection vulnerability
The touchlist_sync.cgi binary on the Wavlink AC3000 router does not check authentication and passes user-supplied input 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 os command injection vulnerability exists in the touchlistsync.cgi touchlistsync() functionality of Wavlink AC3000 M33A8.V5030.210505. A specially crafted set of HTTP requests 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 binary fails to authenticate requests and does not sanitise the IP parameter before inserting it into a shell command.
Impact
An attacker with network access can execute arbitrary commands on the device, leading to full compromise.
What the attacker needed
Network access to the device
The fix
The binary should require authentication and sanitise the IP parameter before using it in a shell command.
How it was found
- Send an HTTP request to touchlist_sync.cgi with a getACL parameter not equal to 1 and an IP parameter containing shell metacharacters.
- The binary inserts the IP value into a curl command and executes it.
- The attacker controls the response from the IP, which is read and split on semicolons.
- Each part is inserted into an iwpriv command and executed, running the injected command.
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 that runs a program without checking if you are logged in. That program takes a value from the web request and puts it directly into a system command, so an attacker can add extra commands that the router will run.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.