Skip to content
RCE Advisory Intermediate CVE-2022-34850

Robustel R1510 web_server /action/import_authorized_keys/ OS command injection vulnerability

The web server's import_authorized_keys API builds a shell command using the admin username without sanitising it, and the username change endpoint allows shell metacharacters. An authenticated attacker could set a malicious username and then trigger the import to execute arbitrary commands.

Francesco Benvenuto Follow

Originally disclosed on Cisco Talos

Critical 9.1 View original

An OS command injection vulnerability exists in the webserver /action/importauthorizedkeys/ functionality of Robustel R1510 3.1.16 and 3.3.0. A specially-crafted network request can lead to arbitrary command execution.

Francesco Benvenuto, 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 username is validated with a regex that permits shell metacharacters, and it is then passed unsanitised into a system command via sysprintf.

Impact

An authenticated attacker with admin privileges could execute arbitrary commands on the router, potentially leading to full compromise.

What the attacker needed

Admin access to the web interface

The fix

The username validation should reject shell metacharacters, and the command should be built without passing user input to a shell.

How it was found

  1. Log in to the web server as an admin user.
  2. Send a request to /ajax/webs_uci_set_super_user/ with a new_username containing shell metacharacters.
  3. Send a POST request to /action/import_authorized_keys/ with a file upload.
  4. The server executes the crafted command during the file copy.

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.

The router's web interface lets an admin change their username. That username is later inserted into a system command without cleaning it, so if it contains special shell characters, the router runs extra commands. An attacker who can log in as admin could abuse this to run their own commands 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 Francesco Benvenuto

View all

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