Skip to content
RCE Advisory Intermediate CVE-2023-39367

Peplink Smart Reader web interface mac2name OS command injection vulnerability

An OS command injection vulnerability in the mac2name functionality of the Peplink Smart Reader web interface allows an authenticated attacker to execute arbitrary commands with root privileges. The attacker can send a specially crafted HTTP request to trigger this.

Matt Wiseman Follow

Originally disclosed on Cisco Talos

Critical 9.1 View original

An OS command injection vulnerability exists in the web interface mac2name functionality of Peplink Smart Reader v1.2.0 (in QEMU). A specially crafted HTTP request can lead to arbitrary 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 mac parameter is inserted into a shell command without validation or escaping, allowing command injection.

Impact

An authenticated attacker can execute arbitrary commands with root privileges, leading to full compromise of the device.

What the attacker needed

Authentication to the web interface

The fix

The vendor released new firmware versions that address the vulnerability.

How it was found

  1. Authenticate to the web interface.
  2. Send a POST request to /cgi-bin/api.cgi with parameters option=xws, type=json, mode=info, func=mac2name, and a malicious mac value.
  3. The device constructs and executes a system command containing the unvalidated mac value, leading to arbitrary command execution.

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 is a command injection bug. The device takes a user-supplied value (the MAC address) and uses it to build a system command without checking it. An attacker who can log in can insert extra commands that run with the highest privileges on 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.