Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2025-13306

CVE-2025-13306: D-Link DWR-M920 RCE Vulnerability

CVE-2025-13306 is a command injection flaw in D-Link DWR-M920 firmware that enables remote code execution. Attackers can exploit this via the formDebugDiagnosticRun function. This article covers affected versions, impact, and mitigation.

Published:

CVE-2025-13306 Overview

CVE-2025-13306 is a command injection vulnerability affecting multiple D-Link router models, including the DWR-M920, DWR-M921, DIR-822K, and DIR-825M 1.1.5. The flaw resides in the system function call within the /boafrm/formDebugDiagnosticRun endpoint. Attackers can manipulate the host argument to inject arbitrary operating system commands. Remote exploitation is possible over the network with low privileges. The exploit details have been publicly disclosed, increasing the risk of opportunistic abuse against exposed devices. The vulnerability maps to CWE-78 (OS Command Injection) and CWE-74 (Improper Neutralization of Special Elements).

Critical Impact

Authenticated remote attackers can execute arbitrary operating system commands on affected D-Link routers through the diagnostic interface, potentially leading to full device compromise.

Affected Products

  • D-Link DWR-M920 firmware 1.1.5 (hardware revision B2)
  • D-Link DWR-M921 firmware 1.1.50
  • D-Link DIR-822K firmware tk_1.00_20250513164613 and DIR-825M firmware 1.1.12

Discovery Timeline

  • 2025-11-18 - CVE-2025-13306 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-13306

Vulnerability Analysis

The vulnerability exists in the diagnostic functionality exposed through the /boafrm/formDebugDiagnosticRun URI. This endpoint accepts a host parameter intended to specify a network target for diagnostic operations such as ping or traceroute. The handler passes the host value directly to a system() call without proper neutralization of shell metacharacters. An attacker who supplies crafted input containing shell separators such as ;, &&, |, or backticks can break out of the intended command context and execute arbitrary commands. Because the boa web server typically runs with elevated privileges on embedded D-Link devices, successful injection allows command execution in that security context. The exploit has been publicly disclosed through a GitHub issue and tracked in VulDB #332646.

Root Cause

The root cause is improper neutralization of special elements used in an OS command [CWE-78]. The firmware concatenates user-controlled input from the host HTTP parameter into a command string before invoking system(). No allowlist validation, escaping, or use of safe execution APIs is performed.

Attack Vector

The attack vector is network-based and requires low-level privileges to reach the diagnostic endpoint. An attacker submits a crafted HTTP POST request to /boafrm/formDebugDiagnosticRun containing a malicious host value. The injected payload executes alongside the intended diagnostic command, enabling arbitrary command execution on the router.

No verified proof-of-concept code is provided in this advisory. Refer to the GitHub issue tracker and VulDB submission #691813 for technical details and disclosure context.

Detection Methods for CVE-2025-13306

Indicators of Compromise

  • HTTP POST requests to /boafrm/formDebugDiagnosticRun containing shell metacharacters such as ;, |, &, $(), or backticks in the host parameter.
  • Unexpected outbound network connections originating from the router management plane following requests to the diagnostic endpoint.
  • New or modified files in writable firmware directories (/tmp, /var) coinciding with diagnostic interface access.

Detection Strategies

  • Inspect router and upstream firewall logs for HTTP requests targeting /boafrm/formDebugDiagnosticRun from untrusted sources.
  • Deploy network-based detection rules that flag shell metacharacters in the host POST parameter for D-Link boa endpoints.
  • Correlate administrative authentication events with diagnostic endpoint access to identify abnormal sequences.

Monitoring Recommendations

  • Restrict and monitor remote management interfaces on D-Link routers, particularly the WAN-side HTTP/HTTPS administration ports.
  • Alert on any externally sourced requests to /boafrm/ paths when management exposure is not intended.
  • Track firmware version inventory across affected D-Link models to confirm patch deployment status.

How to Mitigate CVE-2025-13306

Immediate Actions Required

  • Disable remote (WAN) administration on affected D-Link DWR-M920, DWR-M921, DIR-822K, and DIR-825M devices.
  • Restrict access to the LAN-side management interface using firewall rules or VLAN segmentation that limits which hosts can reach /boafrm/ endpoints.
  • Rotate administrative credentials on affected devices, as authenticated network access is required for exploitation.
  • Monitor the D-Link security advisory page for vendor-supplied firmware updates addressing this issue.

Patch Information

No vendor patch advisory is referenced in the NVD entry at the time of publication. Administrators should consult the D-Link support portal for firmware releases that supersede DWR-M920 1.1.5, DWR-M921 1.1.50, DIR-822K tk_1.00_20250513164613, and DIR-825M 1.1.12. Where these models are designated end-of-life, replacement with a currently supported device is recommended.

Workarounds

  • Block external HTTP/HTTPS access to the router administrative interface at the network perimeter.
  • Place vulnerable devices behind a segmented management network accessible only through a VPN or jump host.
  • Where management access cannot be restricted, consider replacing affected models with supported hardware that receives active security maintenance.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.