cbcvebase.
CVE-2024-8131
published 2024-08-24

CVE-2024-8131: A vulnerability was found in D-Link DNS-120, DNR-202L, DNS-315L, DNS-320, DNS-320L, DNS-320LW, DNS-321, DNR-322L, DNS-323, DNS-325, DNS-326, DNS-327L, DNR-326…

PriorityP272critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
EPSS
8.21%
94.2th percentile
A vulnerability was found in D-Link DNS-120, DNR-202L, DNS-315L, DNS-320, DNS-320L, DNS-320LW, DNS-321, DNR-322L, DNS-323, DNS-325, DNS-326, DNS-327L, DNR-326, DNS-340L, DNS-343, DNS-345, DNS-726-4, DNS-1100-4, DNS-1200-05 and DNS-1550-04 up to 20240814 and classified as critical. Affected by this issue is the function module_enable_disable of the file /cgi-bin/apkg_mgr.cgi of the component HTTP POST Request Handler. The manipulation of the argument f_module_name leads to command injection. The attack may be launched remotely. The exploit has been disclosed to the public and may be used. NOTE: This vulnerability only affects products that are no longer supported by the maintainer. NOTE: Vendor was contacted early and confirmed that the product is end-of-life. It should be retired and replaced.

Affected

20 ranges
VendorProductVersion rangeFixed in
d-linkdnr-202l
d-linkdnr-322l
d-linkdnr-326
d-linkdns-1100-4
d-linkdns-120
d-linkdns-1200-05
d-linkdns-1550-04
d-linkdns-315l
d-linkdns-320
d-linkdns-320l
d-linkdns-320lw
d-linkdns-321
d-linkdns-323
d-linkdns-325
d-linkdns-326
d-linkdns-327l
d-linkdns-340l
d-linkdns-343
d-linkdns-345
d-linkdns-726-4

Detection & IOCsextracted from sources · hover to see the quote

path/cgi-bin/apkg_mgr.cgi
commandPOST /cgi-bin/apkg_mgr.cgi with body parameter f_module_name= containing shell metacharacters (;, \n, `, |, $)
snort
alert http any any -> $HOME_NET any (msg:"ET WEB_SPECIFIC_APPS D-Link apkg_mgr.cgi f_module_name Parameter Command Injection Attempt (CVE-2024-8131)"; flow:established,to_server; http.method; content:"POST"; http.uri; bsize:21; content:"/cgi-bin/apkg_mgr.cgi"; fast_pattern; http.request_body; content:"f_module_name|3d|"; pcre:"/^[^\x26]*?(?:(?:\x3b|%3[Bb])|(?:\x0a|%0[Aa])|(?:\x60|%60)|(?:\x7c|%7[Cc])|(?:\x24|%24))+/R"; reference:cve,2024-8131; classtype:attempted-admin; sid:2065115; rev:1;)
  • Detect HTTP POST requests to /cgi-bin/apkg_mgr.cgi with exactly 21 bytes in the URI path, targeting the f_module_name body parameter for command injection via shell metacharacters (;, newline, backtick, pipe, $).
  • The injection point is the function module_enable_disable in /cgi-bin/apkg_mgr.cgi; monitor for POST requests to this endpoint from external/perimeter sources.
  • Both plain and URL-encoded variants of shell metacharacters should be detected: %3B (;), %0A (newline), %60 (backtick), %7C (|), %24 ($).
  • Attack is classified as MITRE ATT&CK T1190 (Exploit Public-Facing Application) under tactic TA0001 (Initial Access); prioritize perimeter and internal deployment of detection rules.
  • The exploit has been publicly disclosed; treat any matching traffic as high-confidence attempted admin-level compromise.
  • ·All affected D-Link devices (DNS-120, DNR-202L, DNS-315L, DNS-320/L/LW, DNS-321, DNR-322L, DNS-323, DNS-325/326/327L, DNR-326, DNS-340L, DNS-343, DNS-345, DNS-726-4, DNS-1100-4, DNS-1200-05, DNS-1550-04) are end-of-life with no patch available; detection is the only mitigation short of device replacement.
  • ·The Snort/Suricata rule (sid:2065115) is scoped to plaintext HTTP only (tls_state plaintext); encrypted traffic to these devices would not be detected by this rule.

CVSS provenance

nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv4.05.3MEDIUMCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
nvdv2.06.5MEDIUMAV:N/AC:L/Au:S/C:P/I:P/A:P
Stop checking back — get the weekly exploitation signal.

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.