Wavlink AC3000 openvpn.cgi openvpn_server_setup() Configuration Control Vulnerabilities
The router's web interface passes user-supplied parameters into configuration files without filtering newlines, allowing an authenticated attacker to inject arbitrary OpenVPN configuration lines and execute commands. This leads to arbitrary command execution on the device.
Originally disclosed on Cisco Talos
Multiple external config control vulnerabilities exists in the openvpn.cgi openvpnserversetup() functionality of Wavlink AC3000 M33A8.V5030.210505. A specially crafted HTTP request can lead to arbitrary command 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
Impact
An authenticated attacker can execute arbitrary commands on the router, potentially leading to full compromise.
What the attacker needed
Authenticated access to the web interface
The fix
The vendor has not released a patch; the product is discontinued, but patches are being worked on.
How it was found
- Log in to the router's web interface to obtain a valid session cookie.
- Send an HTTP POST request to openvpn.cgi with page=server and vpn_type=server, including a malicious value in one of the parameters such as sel_open_protocol.
- The router stores the malicious value in NVRAM and later runs the openvpn.sh script, which writes the value into the OpenVPN server configuration file.
- When the OpenVPN server starts, it reads the injected configuration line and executes the embedded 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.
The router's web page for setting up a VPN takes input from the user and writes it directly into a configuration file. Because it doesn't check for special characters like new lines, an attacker who is logged in can add extra settings that make the router run commands. This gives the attacker full control over the router.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.