Skip to content
RCE Advisory Advanced CVE-2022-20707

(Pwn2Own) Cisco RV340 JSON RPC file-copy Command Injection Local Privilege Escalation Vulnerability

A local privilege escalation flaw in Cisco RV340 routers allows an attacker who can already execute low-privileged code to escalate to root by exploiting improper validation of user-supplied strings in file-copy JSON RPC requests, leading to command injection.

Stephen Fewer Follow

Originally disclosed on Zero Day Initiative

High 7.8 View original

This vulnerability allows local attackers to escalate privileges on affected installations of Cisco RV340 routers. An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability.

Stephen Fewer of Relyze Software Limited (www.relyze.com), on the Zero Day Initiative

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 file-copy JSON RPC handler fails to validate user-supplied input before passing it to a system call, enabling command injection.

Impact

An attacker with low-privileged code execution can escalate to root and execute arbitrary code.

What the attacker needed

Ability to execute low-privileged code on target

The fix

Cisco has issued an update to correct this 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.

This is a bug in Cisco RV340 routers that lets someone who already has limited access to the device run commands as the all-powerful root user. The problem is that the router takes input from a file-copy request and uses it in a system command without checking it first, so an attacker can sneak in extra commands.

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 Stephen Fewer

View all

1 more disclosed report, best first.

More from Zero Day Initiative

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.