Tp-Link Archer AX53 v1.0 Openvpn configuration restore script_security OS command injection vulnerability
The router's OpenVPN configuration restore feature accepts a user-supplied script_security value and an up option, letting an authenticated administrator make OpenVPN run an arbitrary script. By also placing a custom script inside the certificate backup archive, an attacker with admin access could execute arbitrary operating system commands on the device.
Originally disclosed on Cisco Talos
An os command injection vulnerability exists in the Openvpn configuration restore scriptsecurity 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 restore script passes user-controlled OpenVPN options, including script_security and up, straight into the generated OpenVPN configuration without restricting them, so the service can be told to run arbitrary scripts.
Impact
An attacker with administrator access could execute arbitrary commands on the router, though the CVSS score reflects the high privileges required.
What the attacker needed
Administrator access to the web interface; ability to upload a crafted backup file
The fix
The vendor released a patch, as listed in the timeline.
How it was found
- Back up the router configuration from the web interface to obtain the binary backup file.
- Decrypt and unpack the backup to reach the readable configuration file.
- Add script_security and up entries to the configuration, and add a custom script to the certificate archive.
- Repack the modified files and upload the backup to restore it.
- The startup script regenerates the OpenVPN configuration and starts the service, which runs the custom script.
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 reload their settings from a backup file. This report shows that one of those settings controls a VPN service, and a crafted backup can tell that service to run a program of the attacker's choosing. The attacker needs to be logged in as an administrator first, so this is not something a random visitor can do.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.