Skip to content
RCE Write-up Intermediate

CVE-2018–25115: D-Link Routers RCE — Your Router’s Wide

The service.cgi endpoint on several D-Link router models fails to sanitise the EVENT=CHECKFW parameter, allowing an unauthenticated attacker to inject shell commands that execute as root. This gives full control of the router, enabling DNS changes, botnet recruitment, and traffic snooping.

CVEHUB Follow

Published on medium.com

Uh oh, looks like some older D-Link routers have a serious problem. We’re talking about remote code execution (RCE), which means attackers could potentially take complete control of your device.

CVEHUB, on medium.com

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 router does not properly sanitise user input to the EVENT=CHECKFW parameter before using it in an OS command.

Impact

An unauthenticated remote attacker could completely control the router, change DNS settings, use it in a botnet, or snoop on network traffic.

What the attacker needed

Network access to the router; no authentication required

The fix

D-Link no longer supports these routers, so no official firmware update will fix the issue; users should replace the router or isolate it behind a firewall.

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.

These routers have a web page called service.cgi that takes a value from the request and passes it to the operating system without checking it. An attacker can put extra system commands in that value, and the router runs them with the highest privileges. Because no login is needed, anyone who can reach the router can try this.

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 CVEHUB

View all

7 more disclosed reports, best first.

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.