CVE-2019-20215
📋 TL;DR
This vulnerability allows unauthenticated remote attackers to execute arbitrary operating system commands on D-Link DIR-859 routers. Attackers can exploit the Simple Service Discovery Protocol (SSDP) implementation by sending specially crafted M-SEARCH requests with malicious urn: values containing shell metacharacters. This affects all users of vulnerable D-Link DIR-859 router firmware versions.
💻 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 backdoors, intercept all network traffic, pivot to internal network devices, and use the router as a botnet node.
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 firewall rules blocking SSDP traffic from untrusted sources.
🎯 Exploit Status
Multiple public exploit scripts are available that require minimal technical skill to use. The vulnerability is actively exploited in the wild.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 1.07 or later
Vendor Advisory: https://supportannouncement.us.dlink.com/announcement/publication.aspx?name=SAP10147
Restart Required: Yes
Instructions:
1. Log into router admin interface. 2. Navigate to Firmware Update section. 3. Download firmware version 1.07 or later from D-Link support site. 4. Upload and install the firmware. 5. Reboot the router after installation completes.
🔧 Temporary Workarounds
Block SSDP traffic at firewall
linuxPrevent exploitation by blocking SSDP (port 1900/udp) traffic from untrusted networks.
iptables -A INPUT -p udp --dport 1900 -j DROP
Disable UPnP/SSDP service
allTurn off the vulnerable SSDP service if not required for network functionality.
Check router admin interface for UPnP/SSDP settings and disable
🧯 If You Can't Patch
- Replace vulnerable router with a different model that is not affected
- Implement strict network segmentation to isolate the router from critical internal resources
🔍 How to Verify
Check if Vulnerable:
Check router firmware version in admin interface or use nmap to scan for SSDP service on port 1900/udp and attempt exploitation with public PoC scripts.
Check Version:
Check router web interface at http://router-ip/ or use telnet/ssh if enabled: cat /etc/version
Verify Fix Applied:
Verify firmware version is 1.07 or later in router admin interface and test that SSDP exploitation attempts no longer succeed.
📡 Detection & Monitoring
Log Indicators:
- Unusual SSDP M-SEARCH requests with urn: containing shell metacharacters
- Multiple failed command execution attempts in system logs
- Unexpected process creation or network connections from router
Network Indicators:
- SSDP traffic from unexpected sources, especially with malformed urn: values
- Outbound connections from router to suspicious IPs or domains
SIEM Query:
source="router.logs" AND ("M-SEARCH" AND "urn:" AND ("|" OR ";" OR "&" OR "`"))
🔗 References
- http://packetstormsecurity.com/files/156250/D-Link-ssdpcgi-Unauthenticated-Remote-Command-Execution.html
- https://medium.com/%40s1kr10s/d-link-dir-859-unauthenticated-rce-in-ssdpcgi-http-st-cve-2019-20215-en-2e799acb8a73
- https://supportannouncement.us.dlink.com/announcement/publication.aspx?name=SAP10147
- http://packetstormsecurity.com/files/156250/D-Link-ssdpcgi-Unauthenticated-Remote-Command-Execution.html
- https://medium.com/%40s1kr10s/d-link-dir-859-unauthenticated-rce-in-ssdpcgi-http-st-cve-2019-20215-en-2e799acb8a73
- https://supportannouncement.us.dlink.com/announcement/publication.aspx?name=SAP10147