Skip to content
RCE Advisory Advanced CVE-2024-36258

Wavlink AC3000 touchlist_sync.cgi touchlistsync() buffer overflow vulnerability

A stack-based buffer overflow exists in the touchlist_sync.cgi binary of the Wavlink AC3000 router. An attacker can send a crafted HTTP request to execute arbitrary code without authentication.

Lilith >_> Follow

Originally disclosed on Cisco Talos

Critical 10.0 View original

A stack-based buffer overflow vulnerability exists in the touchlistsync.cgi touchlistsync() functionality of Wavlink AC3000 M33A8.V5030.210505. A specially crafted HTTP request can lead to arbitrary code execution.

Lilith >_>, on Cisco Talos

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 touchlistsync() function copies attacker-controlled data into a fixed-size stack buffer using sprintf without bounds checking, and the destination offset advances by a fixed amount per semicolon, allowing overflow.

Impact

An attacker can execute arbitrary code on the device with the privileges of the web server, potentially taking full control of the router.

What the attacker needed

Network access to the device; attacker controls a server to respond to curl

The fix

The vendor has discontinued the product but patches are being worked on; the fix should add bounds checking to the sprintf call and validate input length.

How it was found

  1. Send an HTTP request to the touchlist_sync.cgi binary with a query string containing an IP parameter pointing to a server controlled by the attacker.
  2. The binary runs a curl command to fetch data from that IP address.
  3. The response from the attacker's server is read into a buffer and passed to touchlistsync().
  4. The function splits the input on semicolons and copies each piece into a stack buffer, advancing the destination by 0x12 bytes per semicolon.
  5. By including many semicolons, the attacker overflows the buffer and overwrites 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 router's web interface. The router runs a small program that copies data from a web request into a fixed-size memory area without checking if it fits, so an attacker can overflow that area and take control of the router. No login is needed because the program does not check who is making the request.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Lilith >_>

View all

148 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.