CVE-2024–10914 D-Link NAS: Unauthenticated Command Injection �
An unauthenticated OS command injection in the account_mgr.cgi component of several D-Link NAS devices lets an attacker run arbitrary commands as root. The name parameter of cgi_user_add is passed to a shell without sanitisation, so shell metacharacters can break out and execute anything.
CVE-2024–10914 is a critical unauthenticated OS command injection vulnerability in multiple D-Link NAS devices, disclosed in November 2024 by security researcher NetSecFish. Any attacker on the network — or on the open internet if the device is port-forwarded — can execute arbitrary OS commands as root without…
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The name parameter from the HTTP request is inserted into a shell command without sanitisation, allowing shell metacharacters to break out and run arbitrary commands.
Impact
An attacker could read, modify, delete, encrypt, or exfiltrate every file on every connected drive with root privileges, and no patch will ever be released for these end-of-life devices.
What the attacker needed
Network access to the device; device reachable (port-forwarded or local)
The fix
The devices are end-of-life and will never be patched; D-Link recommends replacing the hardware, disconnecting it from the internet, isolating it on a separate VLAN, and blocking relevant ports at the firewall.
How it was found
- Run the exploit script with the target URL using the -u flag.
- The script sends a request to account_mgr.cgi with a crafted name parameter.
- The injected command executes and returns output confirming root access.
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 write-up has not been written yet. The Original tab links to the source.
A NAS is a network hard drive with a small web server. The device takes a username from a web form and puts it into a system command without cleaning it. Special characters in the username can end that command and start a new one, so an attacker can run their own commands as the all-powerful root user.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.