Yifan YF325 validate.so diag_ping_start command execution vulnerability
The Yifan YF325 router's diagnostic ping functionality passes the user-supplied ping_ip parameter directly into a shell command without sanitisation. An unauthenticated attacker can send a crafted request to execute arbitrary commands on the device.
Originally disclosed on Cisco Talos
A command execution vulnerability exists in the validate.so diagpingstart functionality of Yifan YF325 v1.020221108. A specially crafted network request can lead to 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 ping_ip parameter is inserted into a shell command via eval without any validation or escaping, and the diagnostic endpoint is reachable without authentication.
Impact
An unauthenticated attacker could execute arbitrary shell commands on the device, leading to full compromise.
What the attacker needed
Network access to the router's web interface; no authentication required
The fix
The vendor released a patch on 2023-10-24.
How it was found
- Send a request with change_action set to gozila_cgi.
- Set submit_button to Ping and submit_type to start.
- Provide a ping_ip value containing shell metacharacters to execute arbitrary 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 running network diagnostics like ping. The page takes an address you type and runs it as a system command, but it does not check what you type. Someone who can reach the router's web interface can type extra commands and the router will run them, even without logging in.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.