ZDI-CAN-21654: ZDI-23-1336: D-Link DIR-3040 prog.cgi SetUsersSettings 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.
Other sources
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 ZDI has assigned a CVSS rating of 6.8. The following CVEs are assigned: CVE-2023-41228.
Affected Software
Event History
Frequently Asked Questions
What is the severity of ZDI-CAN-21654?
The severity of ZDI-CAN-21654 is high due to its potential to allow remote code execution on vulnerable D-Link DIR-3040 routers.
How do I fix ZDI-CAN-21654?
To fix ZDI-CAN-21654, update the D-Link DIR-3040 firmware to the latest version provided by the manufacturer.
Who is affected by ZDI-CAN-21654?
Users of the D-Link DIR-3040 router are affected by ZDI-CAN-21654 if they have an unpatched version of the firmware.
Is authentication required to exploit ZDI-CAN-21654?
Yes, authentication is required to exploit the ZDI-CAN-21654 vulnerability.
What can attackers do with ZDI-CAN-21654?
Attackers can execute arbitrary code on affected installations of the D-Link DIR-3040 routers by exploiting ZDI-CAN-21654.