Skip to content
RCE Advisory Intermediate CVE-2023-28381

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.

Matt Wiseman Follow

Originally disclosed on Cisco Talos

High 7.2 View original

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.

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 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

  1. Authenticate to the device as a user with write privileges.
  2. Configure the device to use MVPN smoothing or bonding.
  3. Send an HTTP POST to the admin.cgi endpoint with the section parameter set to MVPN_trial_init.
  4. Include a debug parameter whose value escapes the intended command.
  5. 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.

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.