CVE-2023-41218

D-Link DIR-3040 prog.cgi SetWan3Settings Stack-Based Buffer Overflow Remote Code Execution Vulnerability

State
Published
Severity
6.8 Medium
Published
May 3, 2024
Updated
Aug 2, 2024
Reserved
Aug 24, 2023

Read the record on cve.org

Description

D-Link DIR-3040 prog.cgi SetWan3Settings 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-21618.

Scores

CVSSScoreVectorSource
3.06.8 MediumCVSS:3.0/AV:A/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:Hzdi

Weaknesses

  • CWE-121 Stack-based Buffer Overflow

Affected Products

ProductVersions
DIR-3040D-Link
  • 120B03Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.