Introduction
A buffer overflow in the ping diagnostic feature of several D-Link routers lets remote attackers compromise devices used in homes and small businesses. Exploit code is public, so a large install base is exposed to memory corruption and potential code execution.
D-Link is a major global networking equipment manufacturer, with millions of consumer and small-business routers deployed worldwide. The DWR-M920, DWR-M921, DWR-M960, DWR-M961, and DIR-825M are popular 4G LTE and wireless router models, widely used for both primary and backup connectivity.
Technical Information
CVE-2025-13304 is a stack-based buffer overflow in the /boafrm/formPingDiagnosticRun endpoint of affected D-Link routers. An attacker triggers it by sending this endpoint an HTTP request with an overly long host parameter. The backend code copies that parameter into a fixed-length buffer without proper bounds checking, and the copy corrupts memory. The flaw is classified under CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer) and CWE-120 (Buffer Copy without Checking Size of Input).
The attack is remote and needs no authentication. Exploit code has been released publicly, which raises the risk of automated exploitation. Public sources include no code snippets or further implementation details.
Affected Systems and Versions
- D-Link DWR-M920 (firmware 1.01.07)
- D-Link DWR-M921 (firmware 1.01.07)
- D-Link DWR-M960 (firmware 1.01.07)
- D-Link DWR-M961 (firmware 1.01.07)
- D-Link DIR-825M (firmware 1.1.47)
Any configuration that exposes the /boafrm/formPingDiagnosticRun endpoint is vulnerable.
Vendor Security History
D-Link has a recurring history of memory safety issues in its router lines. Earlier vulnerabilities in the DIR-825, DWR, and DAP series include buffer overflows and command injection flaws, often tied to insufficient input validation. D-Link's response times have varied, and some advisories and patches arrived late or incomplete. Its security maturity is improving but remains inconsistent across product lines.



