Skip to content
RCE Advisory Advanced CVE-2024-39788CVE-2024-39790CVE-2024-39789

Wavlink AC3000 nas.cgi set_ftp_cfg() Configuration Control Vulnerabilities

The router's web interface allows an authenticated attacker to inject newline characters into FTP configuration parameters, which are written into the ProFTPD configuration file. This can add a directive like DefaultRoot /, giving FTP users access to the entire filesystem and potentially leading to a shell.

Lilith >_> Follow

Originally disclosed on Cisco Talos

Critical 9.1 View original

Multiple external config control vulnerabilities exist in the nas.cgi setftpcfg() functionality of Wavlink AC3000 M33A8.V5030.210505. A specially crafted HTTP request can lead to permission bypass.

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

Impact

An authenticated attacker could gain directory traversal to any directory accessible to the FTP user, which can quickly lead to gaining a shell on the system.

What the attacker needed

Authenticated access to the web interface; network access to the device

How it was found

  1. Log in to the router's web interface to obtain a valid session cookie.
  2. Send an HTTP POST request to nas.cgi with page=ftp and include a parameter such as ftp_name containing a newline followed by a malicious ProFTPD directive.
  3. The router stores the parameter in NVRAM and then runs storage.sh ftp, which writes the value into the ProFTPD configuration file.
  4. The injected directive (e.g., DefaultRoot /) takes effect, granting FTP access to the entire filesystem.

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 runs a small web server that lets administrators change settings. Some of these settings are used to build a configuration file for an FTP server without checking for special characters. An attacker who is already logged in can add extra lines to that file, which can give them more access to the device's files.

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.