(0Day) D-Link DIR-X3260 SetSysEmailSettings EmailFrom Command Injection Remote Code Execution Vulnerability
The router's prog.cgi program handling HNAP requests fails to validate a user-supplied string before passing it to a system call, allowing command injection. A network-adjacent attacker who bypasses the existing authentication could execute arbitrary code as root.
Originally disclosed on Zero Day Initiative
This vulnerability allows network-adjacent attackers to execute arbitrary code on affected installations of D-Link DIR-X3260 routers. Although authentication is required to exploit this vulnerability, the existing authentication mechanism can be bypassed.
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, a user-supplied value from an HNAP request is passed into a system call without validation or sanitisation, allowing command injection.
Impact
A network-adjacent attacker who bypasses authentication could execute arbitrary code as root on the router; the text notes the existing authentication mechanism can be bypassed but gives no further detail.
What the attacker needed
Network-adjacent access; bypass of existing authentication
The fix
The vendor did not release a fix before the advisory; the only suggested mitigation is to restrict interaction with the application.
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 runs a small web server that accepts special requests called HNAP. One of its programs takes text from those requests and hands it to the operating system as a command without checking it first. That means someone on the same network could sneak their own commands in and run them with the highest privileges on the device.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.