peplink Surf SOHO HW1 admin.cgi USSD_send OS command injection vulnerability
An OS command injection vulnerability exists in the admin.cgi USSD_send functionality of Peplink Surf SOHO HW1 v6.3.5. An authenticated attacker with write privileges can send a crafted HTTP request to execute arbitrary commands with root privileges.
Originally disclosed on Cisco Talos
An OS command injection vulnerability exists in the admin.cgi USSDsend 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 ussd_code parameter from an HTTP POST request is passed directly into a shell command via snprintf and popen without sanitisation, allowing command injection.
Impact
An authenticated attacker with write privileges could execute arbitrary commands with root privileges, leading to full compromise of the device.
What the attacker needed
Authenticated as user with write privileges; device has a functioning GSM module
How it was found
- Authenticate to the device with write privileges.
- Send an HTTP POST request to /cgi-bin/MANGA/admin.cgi with the section parameter set to USSD_send.
- Include a malicious ussd_code parameter that escapes the intended command.
- The device executes the injected command with root privileges.
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 report describes a security flaw in a home router's web interface. When an admin sends a special request to control the router's cellular modem, the router takes a value from that request and uses it to build a system command without checking it. An attacker who is already logged in as an admin could insert extra commands that the router then runs with the highest privileges, potentially taking full control of the device.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.