peplink Surf SOHO HW1 admin.cgi MVPN_trial_init OS command injection vulnerability
An OS command injection flaw exists in the admin.cgi MVPN_trial_init handler of the Peplink Surf SOHO HW1 router firmware. An authenticated user with write privileges could inject shell metacharacters through the debug parameter to run arbitrary commands as root, provided MVPN smoothing or bonding is configured.
Originally disclosed on Cisco Talos
An OS command injection vulnerability exists in the admin.cgi MVPNtrialinit functionality of peplink Surf SOHO HW1 v6.3.5 (in QEMU). A specially crafted HTTP request can lead to 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 handler copies an attacker-controlled request parameter into a shell command string passed to system() without sanitising shell metacharacters.
Impact
An authenticated attacker with write privileges could execute arbitrary commands as root, giving full control of the device, though the injected value is limited to 0x20 bytes.
What the attacker needed
Authenticated write-privileged account; MVPN smoothing or bonding configured; payload fits within 0x20 bytes
How it was found
- Authenticate to the device as a user with write privileges.
- Configure the device to use MVPN smoothing or bonding.
- Send an HTTP POST to the admin.cgi endpoint with the section parameter set to MVPN_trial_init.
- Include a debug parameter whose value escapes the intended command.
- The crafted command runs as root on the device.
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 runs a small web server for its settings pages. One settings action builds a text command for the operating system using a value the user supplies, without cleaning it first. Because the operating system treats certain characters as instructions, a logged-in user could sneak extra commands into that value and have the router run them with the highest privileges.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.