Description
An OS command injection vulnerability exists in various legacy D-Link routers—including DIR-300 rev B and DIR-600 (firmware ≤ 2.13 and ≤ 2.14b01, respectively)—due to improper input handling in the unauthenticated command.php endpoint. By sending specially crafted POST requests, a remote attacker can execute arbitrary shell commands with root privileges, allowing full takeover of the device. This includes launching services such as Telnet, exfiltrating credentials, modifying system configuration, and disrupting availability. The flaw stems from the lack of authentication and inadequate sanitation of the cmd parameter.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| D-Link | DIR-600 | ≤ 2.14b01 | — |
| D-Link | DIR-300 | ≤ 2.13 | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
D-Link Devices Unauthenticated Remote Command Execution
exploit/linux/http/dlink_command_php_exec_noauth
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
References
- https://raw.githubusercontent.com/rapid7/metasploit-framework/master/modules/exploits/linux/http/dlink_command_php_exec_noauth.rb exploit
- https://www.exploit-db.com/exploits/24453 exploit
- https://www.exploit-db.com/exploits/27528 exploit
- https://web.archive.org/web/20131022221648/http://www.s3cur1ty.de/m1adv2013-003 technical-description exploit
- https://www.vulncheck.com/advisories/d-link-legacy-unauth-rce third-party-advisory