Critical Vulnerability Alert: CVE-2025-22949 – Tenda AC9 Router Command Injection
The router's HTTP handler for Samba configuration fails to sanitise user input, allowing injected system commands to run on the device. An attacker could execute arbitrary operating system commands, potentially taking full control of the router and the network behind it.
Published on medium.com
The vulnerability is a command injection flaw that exists in the HTTP request handler for the /goform/SetSambaCfg endpoint. This occurs due to insufficient input validation, where the application does not properly sanitize user-supplied inputs, allowing malicious data to be interpreted as system commands.
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, user-supplied parameters sent to the Samba configuration endpoint are passed directly into a system command without sanitisation or filtering.
Impact
Successful exploitation could lead to full system compromise of the router, giving attackers control over network traffic and connected devices.
What the attacker needed
Access to the router's admin interface; ability to send HTTP POST requests
The fix
Tenda has not confirmed a patch; users should check for firmware updates and restrict remote management access in the meantime.
How it was found
- Send an HTTP POST request to the router's /goform/SetSambaCfg endpoint.
- Include a samba_user parameter containing a shell metacharacter followed by an operating system command.
- The router appends the unsanitised value to a system command and executes it.
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 write-up has not been written yet. The Original tab links to the source.
A router has a web page for changing Samba (file-sharing) settings. The code behind that page takes what you type and passes it to the operating system without checking it first. An attacker can type extra system commands into a field, and the router will run them as if the administrator had typed them.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.