CVE-2019-16920
📋 TL;DR
Unauthenticated remote code execution vulnerability in D-Link routers via command injection in the PingTest CGI interface. Attackers can send specially crafted requests to execute arbitrary commands with root privileges. Affects multiple D-Link router models including DIR-655C, DIR-866L, DIR-652, DHP-1565, and others.
💻 Affected Systems
- DIR-655C
- DIR-866L
- DIR-652
- DHP-1565
- DIR-855L
- DAP-1533
- DIR-862L
- DIR-615
- DIR-835
- DIR-825
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Full system compromise allowing attacker to install persistent backdoors, intercept network traffic, pivot to internal networks, and brick devices.
Likely Case
Attacker gains root shell access to router, enabling traffic interception, DNS hijacking, credential theft, and lateral movement to connected devices.
If Mitigated
If properly segmented and monitored, impact limited to router compromise with potential for network reconnaissance and limited lateral movement.
🎯 Exploit Status
Simple HTTP POST request with command injection payload to PingTest endpoint. Multiple public exploits available.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Varies by model - check D-Link advisories for specific firmware versions
Vendor Advisory: https://supportannouncement.us.dlink.com/announcement/publication.aspx?name=SAP10147
Restart Required: Yes
Instructions:
1. Identify router model and current firmware version. 2. Visit D-Link support site for your specific model. 3. Download latest firmware. 4. Log into router web interface. 5. Navigate to firmware update section. 6. Upload and apply new firmware. 7. Wait for router to reboot.
🔧 Temporary Workarounds
Disable WAN access to web interface
allPrevent external access to router management interface
Log into router → Administration → Remote Management → Disable
Network segmentation and firewall rules
linuxIsolate routers and restrict access to management interfaces
iptables -A INPUT -p tcp --dport 80 -j DROP
iptables -A INPUT -p tcp --dport 443 -j DROP
🧯 If You Can't Patch
- Replace affected routers with supported models from different vendors
- Implement strict network segmentation and monitor for suspicious traffic to router management interfaces
🔍 How to Verify
Check if Vulnerable:
Check if router responds to crafted POST request to /ping.cgi or similar PingTest endpoint with command injection payload
Check Version:
Log into router web interface → Status or Tools → Firmware Version
Verify Fix Applied:
Attempt exploitation after patch - should no longer execute injected commands. Verify firmware version matches patched release.
📡 Detection & Monitoring
Log Indicators:
- Unusual POST requests to ping.cgi or similar endpoints
- Commands like ';', '|', '&' in URL parameters
- Multiple failed login attempts followed by ping.cgi access
Network Indicators:
- HTTP POST requests to router IP on port 80/443 containing shell metacharacters
- Outbound connections from router to suspicious IPs
SIEM Query:
source="router.log" AND (url="*ping.cgi*" AND (param="*;*" OR param="*|*" OR param="*&*"))
🔗 References
- https://fortiguard.com/zeroday/FG-VD-19-117
- https://medium.com/%4080vul/determine-the-device-model-affected-by-cve-2019-16920-by-zoomeye-bf6fec7f9bb3
- https://www.kb.cert.org/vuls/id/766427
- https://www.seebug.org/vuldb/ssvid-98079
- https://fortiguard.com/zeroday/FG-VD-19-117
- https://medium.com/%4080vul/determine-the-device-model-affected-by-cve-2019-16920-by-zoomeye-bf6fec7f9bb3
- https://www.kb.cert.org/vuls/id/766427
- https://www.seebug.org/vuldb/ssvid-98079
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2019-16920