Tp-Link Archer AX53 v1.0 Openvpn configuration restore client_disconnect OS command injection vulnerability
The router's OpenVPN configuration restore feature accepts a client_disconnect option that is written into the OpenVPN server config and executed as a command. An attacker who can upload a crafted backup file could run arbitrary commands on the device, for example starting a remote login service.
Originally disclosed on Cisco Talos
An os command injection vulnerability exists in the Openvpn configuration restore clientdisconnect functionality of Tp-Link Archer AX53 v1.0 1.3.1 Build 20241120 rel.54901(5553). A specially crafted configuration value 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 init script copies configuration values such as client_disconnect into the OpenVPN server config without sanitising them, and OpenVPN executes that value as a command.
Impact
An attacker with web interface access could gain a remote shell with the same credentials, obtaining access not allowed through the web GUI.
What the attacker needed
Authenticated access to the web GUI; ability to upload a restored configuration; connect to the OpenVPN server
The fix
The vendor released a patch; the configuration values should be validated or escaped before being written into the OpenVPN config.
How it was found
- Download the router configuration backup from the web interface.
- Decrypt and unpack the backup to obtain the readable configuration file.
- Add a client_disconnect value that starts a remote login service, then repack and re-encrypt the file.
- Restore the modified backup through the web interface.
- Connect to the OpenVPN server and disconnect to trigger the 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.
Routers let you save and restore their settings as a backup file. This router reads some settings from that file and passes them to a program that runs commands, so a tampered backup can make the router run commands the owner never intended. The attacker needs to be logged in to the router's web interface to upload the file.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.