Skip to content
RCE Advisory Intermediate CVE-2017-12121

Moxa EDR-810 Web RSA Key Generation Command Injection Vulnerability

The web interface of the Moxa EDR-810 router passes the rsakey_name parameter to a system command without sanitisation, allowing an authenticated user to inject OS commands. An attacker could use this to obtain a root shell on the device.

Carlos Pacho Follow

Originally disclosed on Cisco Talos

High 8.8 View original

An exploitable command injection vulnerability exists in the web server functionality of Moxa EDR-810 V4.1 build 17030317. A specially crafted HTTP POST can cause a privilege escalation resulting in root shell.

Carlos Pacho, 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 web server passes the user-supplied rsakey_name parameter directly to a system() call without sanitising shell metacharacters.

Impact

An authenticated attacker could execute arbitrary commands as root, leading to full compromise of the device.

What the attacker needed

Valid login credentials; network access to the web interface

The fix

The vendor patched the vulnerability and published new firmware on 2018-04-12.

How it was found

  1. Log in to the device's web interface.
  2. Send a POST request to /goform/net_WebRSAKEYGen with a valid session cookie.
  3. Include a crafted rsakey_name parameter containing shell commands.
  4. The injected commands execute as root, for example starting a shell listener.

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.

Command injection happens when a program takes user input and runs it as part of a system command without checking it. Here, the router's web page for generating an RSA key uses the key name in a shell command, so a logged-in user can add extra shell commands to that name. This lets them run commands as the root user, the highest privilege level 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 Carlos Pacho

View all

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