CVE-2023-41218: D-Link DIR-3040 prog.cgi SetWan3Settings Stack-Based Buffer Overflow Remote Code Execution Vulnerability
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.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2023-41218?
CVE-2023-41218 is classified as a critical vulnerability due to its potential for remote code execution.
How can I mitigate CVE-2023-41218?
To mitigate CVE-2023-41218, ensure that your D-Link DIR-3040 router firmware is updated to the latest version provided by D-Link.
Is authentication required to exploit CVE-2023-41218?
Yes, authentication is required for exploiting CVE-2023-41218, allowing only authenticated users to trigger the vulnerability.
What types of attacks can CVE-2023-41218 enable?
CVE-2023-41218 can enable network-adjacent attackers to execute arbitrary code on affected D-Link DIR-3040 routers.
What should I do if my D-Link DIR-3040 router is vulnerable to CVE-2023-41218?
If your D-Link DIR-3040 router is vulnerable to CVE-2023-41218, immediately update the firmware to the fix provided by D-Link.