Skip to main content
VulnerabilityPublished Updated

CVE-2024-5293: D-Link DIR-2640 · Stack-based Buffer Overflow

Affects D-Link DIR-2640Source CVE Database V5

0

Not known to be exploited · CVSS 8.8 High.

Data as of 26 Oct 2026, 08:30 UTC

CVSS 3.0 base score
8.8High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
1.6% chance of exploitation in 30 days – higher than 75% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.0/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 23 May 2024

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

AI-suggested

1. Immediate mitigation should focus on network segmentation and access control: restrict access to the router's management interfaces (ports 80 and 443) to trusted IP addresses only, ideally via firewall rules or VLAN segmentation. 2. Disable remote management features if enabled, especially over WAN interfaces, to reduce exposure. 3. Monitor network traffic for unusual or malformed HNAP requests or HTTP Referer headers targeting the router. 4. Employ intrusion detection/prevention systems (IDS/IPS) with signatures or heuristics capable of detecting exploitation attempts targeting this vulnerability. 5. Regularly check for and apply official firmware updates or patches from D-Link as soon as they become available. 6. If patching is delayed, consider replacing affected devices with models not vulnerable to this issue. 7. Conduct internal audits to identify all instances of the DIR-2640 router and verify firmware versions to prioritize remediation. 8. Educate network administrators about the vulnerability and the importance of limiting administrative interface exposure. These steps go beyond generic advice by focusing on network-level controls and proactive monitoring tailored to the specific vulnerability vectors.

Description

D-Link DIR-2640 HTTP Referer 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-2640-US routers. Authentication is not required to exploit this vulnerability. The specific flaw exists within prog.cgi, 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 the length of user-supplied data prior to copying it to a fixed-length stack-based buffer. An attacker can leverage this vulnerability to execute code in the context of root. Was ZDI-CAN-21853.

References

Community reviews

Loading reviews…