Cisco RV340 set_snmp usmUserAuthKey Command Injection Remote Code Execution Vulnerability
The router's JSON-RPC handler passed the usmUserAuthKey value into a system call without validating it, so a logged-in attacker could run commands as the www-data user. The flaw is network-adjacent and needs authentication.
Originally disclosed on Zero Day Initiative
This vulnerability allows network-adjacent attackers to execute arbitrary code on affected installations of Cisco RV340 routers. Authentication is required to exploit this vulnerability.
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
Likely the JSON-RPC handler built a shell command from the usmUserAuthKey value without sanitising it, allowing command injection.
Impact
An authenticated, network-adjacent attacker could execute arbitrary code as the www-data user on the router.
What the attacker needed
Network-adjacent access to the router; valid authentication
The fix
Cisco issued an update that corrects the vulnerability.
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.
A router runs a small web service that accepts settings over JSON-RPC, a way for programs to call functions on a server. One setting, the SNMP authentication key, was handed straight to the operating system's command shell instead of being treated as plain text. Because of that, someone who could log in could slip extra commands into that setting and have the router run them.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.