TP-Link ER7206 Omada Gigabit VPN Router uhttpd ipsec command injection vulnerability
An authenticated user could inject shell commands through the name field of an IPsec policy, leading to arbitrary command execution as root. The attacker could gain unrestricted shell access to the router.
the Vulnerability Discovery Follow
Originally disclosed on Cisco Talos
A post authentication command injection vulnerability exists in the ipsec policy functionality of Tp-Link ER7206 Omada Gigabit VPN Router 1.3.0 build 20230322 Rel.70591. A specially crafted HTTP request can lead to arbitrary command injection.
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 name of the IPsec policy is used as an argument to a shell command without any sanitization.
Impact
An attacker could execute arbitrary commands as root, gaining unrestricted shell access to the device.
What the attacker needed
Authenticated access to the web interface
The fix
The vendor released a new firmware that fixes the vulnerability.
How it was found
- Log in to the router's web interface.
- Navigate to VPN -> IPsec -> IPsec Policy.
- Add a new IPsec policy and include shell metacharacters in the name field.
- Submit the form to trigger the command injection.
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.
This router has a web interface where you can set up VPN connections. When you create a new VPN policy, the name you type is passed directly to a system command without cleaning it up. A logged-in attacker could type special characters that make the system run extra commands, giving them full control of 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.