Totolink X2000R boa formPasswordSetup OS command injection vulnerability
The router's password setup handler passes the new password into a shell command without sanitising it, so a crafted password runs arbitrary commands on the device. An attacker who is already logged in and can put the router into mesh mode could execute code as the web server.
Originally disclosed on Cisco Talos
An OS command injection vulnerability exists in the boa formPasswordSetup functionality of X2000R (version(s): TOTOLINK-X2000R-Gh-V1.0.0-B20250421.1327). A specially crafted HTTP request can lead to arbitrary code 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 new password value is formatted into a shell command string and passed to system() without any sanitisation or escaping.
Impact
An authenticated attacker could execute arbitrary commands on the router, but only after the device is placed in mesh mode and valid current credentials are supplied.
What the attacker needed
Valid admin credentials; device placed in mesh mode; access to the web admin interface
How it was found
- Log in through the router's login page so the session is authenticated.
- Use another form to switch the device into mesh mode.
- Submit the password setup form with the current credentials and a new password containing shell metacharacters.
- The handler builds a command from the new password and runs it, executing the injected commands.
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 router has a web page for changing the admin password. Behind that page, the software builds a text command for the operating system and pastes the new password straight into it. If the password contains special shell characters, the device runs them as extra commands, which lets someone who is already logged in take control of the router's underlying system.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.