Skip to content
RCE Advisory Intermediate CVE-2023-27380

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.

Matt Wiseman Follow

Originally disclosed on Cisco Talos

High 7.2 View original

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.

Matt Wiseman, on Cisco Talos

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

  1. Authenticate to the device with write privileges.
  2. Send an HTTP POST request to /cgi-bin/MANGA/admin.cgi with the section parameter set to USSD_send.
  3. Include a malicious ussd_code parameter that escapes the intended command.
  4. 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.

More by Matt Wiseman

View all

73 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.