Skip to content
RCE Advisory Beginner CVE-2021-21805

Advantech R-SeeNet ping.php OS Command Injection vulnerability

The ping.php script in Advantech R-SeeNet takes the hostname parameter from an HTTP request without sanitisation and passes it directly to a shell command, allowing an attacker to execute arbitrary OS commands. An unauthenticated attacker can send a crafted request to run commands on the server.

Member Follow

Originally disclosed on Cisco Talos

Critical 9.8 View original

An OS Command Injection vulnerability exists in the ping.php script functionality of Advantech R-SeeNet v 2.4.12 (20.10.2020). A specially crafted HTTP request can lead to arbitrary OS command execution.

Member, 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 hostname parameter is not sanitised before being used in a popen call that executes a shell command.

Impact

An unauthenticated attacker can execute arbitrary OS commands on the server, leading to full compromise.

What the attacker needed

No authentication required; network access to the web interface

How it was found

  1. Send an HTTP GET request to /php/ping.php with a hostname parameter containing shell metacharacters and a command.
  2. The server executes the ping command with the injected command and returns the output in the response.

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 web page that runs 'ping' takes a hostname from the user and puts it straight into a system command without checking it. An attacker can add extra shell commands after the hostname, so the server runs those commands too, letting the attacker take control of the machine.

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 Member

View all

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