CVE-2019-20217
📋 TL;DR
This vulnerability allows remote attackers to execute arbitrary operating system commands on D-Link DIR-859 routers without authentication. Attackers can exploit the Simple Service Discovery Protocol (SSDP) implementation by sending specially crafted M-SEARCH requests containing shell metacharacters. All users of affected D-Link DIR-859 router versions are at risk.
💻 Affected Systems
- D-Link DIR-859
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete compromise of the router allowing attackers to install persistent malware, intercept all network traffic, pivot to internal network devices, and use the router as part of a botnet.
Likely Case
Router takeover leading to DNS hijacking, credential theft from network traffic, and installation of cryptocurrency miners or other malware.
If Mitigated
Limited impact with proper network segmentation and monitoring, though the router itself would still be compromised.
🎯 Exploit Status
Exploit code is publicly available and requires minimal technical skill to execute. The vulnerability is actively exploited in the wild.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Firmware version 1.07 or later
Vendor Advisory: https://supportannouncement.us.dlink.com/announcement/publication.aspx?name=SAP10147
Restart Required: Yes
Instructions:
1. Download firmware version 1.07 or later from D-Link support site. 2. Log into router admin interface. 3. Navigate to Tools > Firmware. 4. Upload and install the new firmware. 5. Reboot the router.
🔧 Temporary Workarounds
Disable UPnP/SSDP
allDisable Universal Plug and Play (UPnP) which includes SSDP service
Block SSDP Ports
linuxBlock UDP port 1900 (SSDP) at network perimeter
iptables -A INPUT -p udp --dport 1900 -j DROP
🧯 If You Can't Patch
- Replace the router with a supported model from a different vendor
- Isolate the router in a separate VLAN with strict firewall rules limiting its network access
🔍 How to Verify
Check if Vulnerable:
Check firmware version in router admin interface under Status > Device Info. If version is 1.05 or 1.06B01 Beta01, the device is vulnerable.
Check Version:
curl -s http://router-ip/status.asp | grep -i firmware
Verify Fix Applied:
After updating, verify firmware version shows 1.07 or later in router admin interface.
📡 Detection & Monitoring
Log Indicators:
- Unusual SSDP/M-SEARCH requests in router logs
- Multiple failed command execution attempts in system logs
- Unexpected processes running on router
Network Indicators:
- SSDP traffic to router on UDP 1900 containing shell metacharacters
- Outbound connections from router to suspicious IPs
- DNS queries to malicious domains from router
SIEM Query:
source="router.log" AND ("M-SEARCH" OR "urn:") AND ("|" OR ";" OR "&" OR "`")
🔗 References
- https://medium.com/%40s1kr10s/d-link-dir-859-rce-unauthenticated-cve-2019-20216-cve-2019-20217-en-6bca043500ae
- https://medium.com/%40s1kr10s/d-link-dir-859-rce-unauthenticated-cve-2019-20216-cve-2019-20217-es-e11ca6168d35
- https://supportannouncement.us.dlink.com/announcement/publication.aspx?name=SAP10147
- https://medium.com/%40s1kr10s/d-link-dir-859-rce-unauthenticated-cve-2019-20216-cve-2019-20217-en-6bca043500ae
- https://medium.com/%40s1kr10s/d-link-dir-859-rce-unauthenticated-cve-2019-20216-cve-2019-20217-es-e11ca6168d35
- https://supportannouncement.us.dlink.com/announcement/publication.aspx?name=SAP10147