Wavlink AC3000 openvpn.cgi openvpn_client_setup() Configuration Control Vulnerability
An authenticated attacker can control the OpenVPN client configuration file through the openvpn.cgi endpoint, allowing them to insert a malicious 'up' directive that executes arbitrary commands when the VPN client starts.
Originally disclosed on Cisco Talos
An external config control vulnerability exists in the openvpn.cgi openvpnclientsetup() 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
Root cause
The openvpn_client_setup function writes user-supplied ovpn_text directly into the client.ovpn file without validating or sanitising its contents, allowing injection of OpenVPN directives that execute commands.
Impact
An authenticated attacker can execute arbitrary commands on the router, leading to full compromise.
What the attacker needed
Valid session cookie (authenticated admin)
The fix
The vendor should validate and sanitise the ovpn_text input to prevent injection of malicious OpenVPN directives.
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=openvpn_client_setup, vpn_type=client, sel_open_client_val=1, and a crafted ovpn_text parameter containing a malicious 'up' directive.
- Trigger the OpenVPN client connection through the web portal or a .cgi binary to execute the injected 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 interface lets an admin upload an OpenVPN configuration file. The router saves this file without checking its contents. An attacker who is logged in can put a special command in the file that the router will run when it starts the VPN, giving them full control of 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.