Skip to content
RCE Advisory Advanced CVE-2024-39604

Wavlink AC3000 update_filter_url.sh argument injection vulnerability

The update_filter_url.sh script on the Wavlink AC3000 router fetches a URL over plain HTTP and uses unfiltered content from the response to build a curl command, allowing an attacker who can intercept the traffic to inject curl arguments. This could let the attacker overwrite arbitrary files, such as /etc/passwd, leading to command execution.

Lilith >_> Follow

Originally disclosed on Cisco Talos

Critical 9.0 View original

A command execution vulnerability exists in the updatefilterurl.sh functionality of Wavlink AC3000 M33A8.V5030.210505. A specially crafted HTTP request can lead to arbitrary command 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 script takes a value from an HTTP response and passes it directly into a curl command without sanitisation, and the initial URL is HTTP, enabling a man-in-the-middle attack.

What the attacker needed

Man-in-the-middle position on the network; router fetches the URL over HTTP

How it was found

  1. The router runs monitor_process.sh every 30 seconds, which may trigger update_filter_url.sh.
  2. update_filter_url.sh reads two URLs from nvram and fetches them with curl over HTTP.
  3. If a URL returns HTTP 200, the script saves the response body to /tmp/url_lib.tmp.
  4. The script extracts a value from the response using grep and sed, storing it in lib_url_tmp.
  5. That value is concatenated with 'url_lib_version.txt' and used in a second curl command.
  6. An attacker performing a man-in-the-middle attack can control the response and inject curl arguments.

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.

The router regularly downloads a file from a website using an unencrypted connection. An attacker on the same network can pretend to be that website and send a malicious response. The router then uses part of that response as part of a command without checking it, letting the attacker run their own commands on 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.

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.