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.
Originally disclosed on Cisco Talos
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.
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
- Log in to the router's web interface to obtain a valid session cookie.
- 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.
- The router stores the parameter in NVRAM and then runs storage.sh ftp, which writes the value into the ProFTPD configuration file.
- 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.