Tp-Link Archer AX53 v1.0 Openvpn configuration restore route_up OS command injection vulnerability
The router's OpenVPN configuration restore feature accepts a route_up option that is written into the OpenVPN server config and executed as a shell 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 routeup 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
Likely the OpenVPN init script copies the route_up value from the restored configuration straight into the OpenVPN config without validating or escaping it, and OpenVPN then executes it as a command.
Impact
An attacker with web interface access could gain a remote shell with privileges beyond what the web interface allows.
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 so they cannot be executed as commands.
How it was found
- Back up the router configuration from the web interface to get a binary file.
- Decrypt and unpack the backup to reach the readable configuration file.
- Add a route_up entry containing a command to the configuration.
- Repack and re-encrypt the file, then restore it on the router.
- Connect to the OpenVPN server so the command runs.
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.
A router lets you save its settings to a file and load them back later. This report shows that one setting inside that file is passed to a program that runs it as a system command, so a tampered file can make the router run the attacker's command. The attacker still needs to be able to log in and 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.