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.
Originally disclosed on Cisco Talos
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.
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
- Log in to the web server as an admin user.
- Send a request to /ajax/webs_uci_set_super_user/ with a new_username containing shell metacharacters.
- Send a POST request to /action/import_authorized_keys/ with a file upload.
- 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.