Buffer overflow in D-Link Dir-3040
CVE-2023-41219
D-Link DIR-3040 prog.cgi SetWanSettings Stack-Based Buffer Overflow Remote Code Execution Vulnerability. This vulnerability allows network-adjacent attackers to execute arbitrary code on affected installations of D-Link DIR-3040 routers. Authentication is required to exploit this vulnerability.
The specific flaw exists within the prog.cgi binary, which handles HNAP requests made to the lighttpd webserver listening on TCP ports 80 and 443. The issue results from the lack of proper validation of a user-supplied string before copying it to a fixed-size stack-based buffer. An attacker can leverage this vulnerability to execute code in the context of root. Was ZDI-CAN-21619.
Vulnerability class: Buffer Overflow
Published · last modified .
CVSS v3 metric
CVSS v3 base score 6.8 (Medium). Vector: CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H.
EPSS exploit prediction
EPSS 0.009, 60.2th percentile (last changed ); unchanged over 30 days. About EPSS.
Affected products
- D-Link Dir-3040 — versions 120B03
- Dlink Dir-3040 Firmware
Weakness classification (CWE)
Public exploits and proof-of-concept code
Also mentioned in 1 other repository (fkie-cad/nvd-json-data-feeds). These reference the CVE in a list, notes or a scanner and are not exploit code for it.
References
- ZDI-23-1327 (x_research-advisory, Third Party Advisory)
- vendor-provided URL (vendor-advisory, Patch, Vendor Advisory)