CVE DatabaseCVE-2019-16920
한국어 권고문 →
CVE-2019-169209.8/CRITICALCISA KEVCWE-78CWE-78

D-Link Routers PingTest CGI Unauthenticated Remote Code Execution Vulnerability Analysis and Mitigation Guide (CVE-2019-16920)

⚡ Jump to Patch
Affected Vendors
d-link
Affected Components
dir-655c, dir-866l, dir-652, dhp-1565, dir-855l, dap-1533, dir-862l, dir-615, dir-835, dir-825
Published Date
2019-09-27
CVSS v3.1
9.8
CRITICAL
EPSS (30d)
100.0%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

D-Link router and AP models including DIR-655C, DIR-866L, DIR-652, DHP-1565, DIR-855L, DAP-1533, DIR-862L, DIR-615, DIR-835, and DIR-825

Impact

Unauthenticated remote attackers can execute arbitrary OS commands and achieve full system compromise by sending specially crafted HTTP requests.

Mitigation

Since most affected devices are End-of-Life (EoL), immediately replace them with supported models, or restrict WAN-side management access and disable remote administration.

Affected Products & Version Scope

Multiple legacy D-Link routers and APs including DIR-655C, DIR-866L, DIR-652, DHP-1565, DIR-855L, DAP-1533, DIR-862L, DIR-615, DIR-835, and DIR-825

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

Most of the affected D-Link devices have reached End-of-Life (EoL) status, and official security patches are no longer provided by the vendor. The primary recommended action is to decommission these legacy devices and replace them with modern, actively supported hardware. If immediate replacement is not feasible, apply the following workarounds.

2. Temporary Workaround & Hardening Configuration

Disable remote management access from the WAN side and restrict access to the web administration interface to trusted internal IP addresses only.

bash
# Example iptables rules to block external WAN access to the web administration ports (80/443)
# Assuming 'eth0' is the external WAN interface
iptables -A INPUT -i eth0 -p tcp --dport 80 -j DROP
iptables -A INPUT -i eth0 -p tcp --dport 443 -j DROP

# Allow access only from a specific trusted management IP (e.g., 192.168.1.100)
iptables -A INPUT -p tcp -s 192.168.1.100 --dport 80 -j ACCEPT

3. Log Audit & IoC Verification Commands

Monitor network traffic and web server logs for requests containing 'PingTest' or suspicious shell metacharacters. You can use the following script to scan your local network for potentially vulnerable endpoints.

bash
#!/bin/bash
# Simple bash script to scan local network for vulnerable D-Link PingTest endpoints
TARGET_NET='192.168.1.0/24'

echo '[*] Scanning for potentially vulnerable D-Link PingTest endpoints...'
for ip in $(nmap -p 80,8080 --open -oG - $TARGET_NET | awk '/Up$/{print $2}'); do
  # Check for the existence of the PingTest CGI endpoint
  status_code=$(curl -s -o /dev/null -w '%{http_code}' --max-time 3 "http://$ip/post_submission.cgi?cmd=PingTest")
  if [ "$status_code" -eq 200 ] || [ "$status_code" -eq 500 ]; then
    echo "[!] WARNING: Potential vulnerable endpoint detected at http://$ip/post_submission.cgi"
  fi
done
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
NordLayer / Zero-Trust Network Access
Due to active in-the-wild exploitation and the EoL status of these devices, immediately replace affected hardware or isolate them from the public internet.

Stop Exposing VPN Ports to the Internet — Switch to Zero-Trust Access

Eliminate public-facing VPN concentrators and firewall management ports with identity-first Zero-Trust Network Access.

90% Attack Surface Reduction · Hardware-Free

Technical Root Cause & Exploitation Mechanics

1. Vulnerability Overview & Root Cause

This vulnerability (CVE-2019-16920) is an OS command injection flaw located within the 'PingTest' Common Gateway Interface (CGI) script of various D-Link routers and access points. The root cause lies in the lack of proper input validation and sanitization of user-supplied parameters (such as IP addresses or hostnames) passed to the ping utility. The application directly concatenates these inputs into a system shell command string, allowing arbitrary command execution.

2. Exploitation Mechanics & Attack Scenario

An unauthenticated attacker can exploit this vulnerability if the device's web management interface (typically running on TCP port 80 or 8080) is exposed to the WAN or an untrusted network. By sending a crafted HTTP POST request containing shell metacharacters (e.g., ;, &&, or |) followed by malicious payloads to the vulnerable CGI endpoint, the attacker bypasses authentication entirely. The web server executes the injected commands with administrative privileges, enabling attackers to download malware (such as Mirai or Gafgyt variants) or modify device configurations.

3. Infrastructure & Business Impact

With a CVSS 3.1 score of 9.8 (Critical) and its inclusion in the CISA KEV catalog, this vulnerability poses a severe threat as it is actively exploited in the wild. Successful exploitation allows threat actors to recruit the compromised devices into DDoS botnets, intercept local network traffic, perform lateral movement within the internal network, or alter DNS settings to redirect users to malicious sites, leading to significant operational disruption and reputational damage.

Official Vendor Advisories & References

NVD Original English Description

Unauthenticated remote code execution occurs in D-Link products such as DIR-655C, DIR-866L, DIR-652, and DHP-1565. The issue occurs when the attacker sends an arbitrary input to a "PingTest" device common gateway interface that could lead to common injection. An attacker who successfully triggers the command injection could achieve full system compromise. Later, it was independently found that these are also affected: DIR-855L, DAP-1533, DIR-862L, DIR-615, DIR-835, and DIR-825.

Frequently Asked SecOps Questions (CVE-2019-16920)

FAQ

Q1. How critical is CVE-2019-16920 and is it actively exploited in the wild?

CVE-2019-16920 is rated CVSS 9.8 (CRITICAL) with a 30-day EPSS exploitation probability of 100.0%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.

Q2. Which vendors and products are affected by CVE-2019-16920?

Primary impacted vendors include d-link across dir-655c, dir-866l, dir-652, dhp-1565, dir-855l, dap-1533, dir-862l, dir-615, dir-835, dir-825. Scope summary: Multiple legacy D-Link routers and APs including DIR-655C, DIR-866L, DIR-652, DHP-1565, DIR-855L, DAP-1533, DIR-862L, DIR-615, DIR-835, and DIR-825

Q3. What temporary mitigations or workarounds exist for CVE-2019-16920 before patching?

[Mitigation] Since most affected devices are End-of-Life (EoL), immediately replace them with supported models, or restrict WAN-side management access and disable remote administration. Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.

SECOPS WORKBENCH INTEGRATION

Generate an Internal Engineering Notice or CISO Report for CVE-2019-16920

Instantly format this advisory into an executive CISO summary or engineering patch ticket.

Generate Report →

🔗 Related Advisories in Similar Stack (d-link)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2019-16920 D-Link Routers PingTest CGI Unauthenticated Remote Code Execution Vulnerability Analysis and Mitigation Guide (CVE-2019-16920) (CVSS 9.8) - Patch & Workaround | CVE Pulse