/

CVE-2025-26237

Severity:

HIGH RISK

(8.1)

Command Injection (CWE-77) in D-Link DI-7001 msp_info

CVE-2025-26237

Deferred

Vulnerability type

Category:

Command Injection

CWE:

CWE-77

Impact:

Arbitrary Command Execution

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A command injection vulnerability in the flag parameter of the msp_info functionality in D-Link DI-7001 MINI_5G may allow an attacker to execute arbitrary operating system commands.

The risk arises when attacker-controlled input reaches a command execution path without adequate validation or safe argument handling.

Affected context

The vulnerability occurs in the D-Link DI-7001 MINI_5G firmware's msp_info functionality, specifically when processing the flag parameter. It becomes risky when this parameter is exposed through a reachable device interface and its value is incorporated into an operating system command without effective separation from command syntax.

Exploit preconditions

  • Attack surface: A device interface or request handler that exposes the msp_info functionality
  • Required access: Access sufficient to submit or influence the flag parameter; the exact authentication requirement depends on device configuration
  • Trigger point: Processing of the flag parameter by the msp_info handler
  • Why exploitation is possible: Input may reach command execution logic without adequate allowlisting, escaping, or argument-safe process invocation

Why this happens

The underlying bug is command injection caused by treating externally influenced input as part of an operating system command. This insecure pattern can allow command separators or shell expressions to alter the intended command behavior. It maps to CWE-77: Improper Neutralization of Special Elements used in a Command, where input is not sufficiently separated from command syntax.

Potential impact

  • An attacker may execute arbitrary commands on the router
  • Device settings or security controls could be modified
  • Network traffic may be monitored, redirected, or disrupted
  • The device could be used for lateral movement or as part of a broader attack
  • Stored data and connected network resources could be exposed

General mitigation guidance

Mitigation generally focuses on preventing user-controlled data from being interpreted as command syntax.

Common defensive patterns include:

  • Replacing shell command construction with direct, argument-separated process APIs
  • Applying strict allowlists for parameters that must select predefined operations
  • Treating all request parameters as untrusted, regardless of their source
  • Enforcing authentication and authorization at administrative interfaces
  • Running device services with the minimum privileges required for their functions
  • Reducing exposed management surfaces and disabling unused services where feasible

How teams detect issues like this

Organizations can identify command injection risks through:

  • Static analysis rules for string concatenation or interpolation in shell and process execution calls
  • Code review checks for request parameters flowing into command interpreters
  • Testing with metacharacter-focused, non-destructive validation inputs in controlled environments
  • Runtime monitoring for unexpected child processes, shell launches, or abnormal command activity
  • Policy enforcement that requires safe process APIs and approved input-validation patterns

Automated security analysis tools may help identify data flows from network parameters to command execution sinks.

Sources

SourceLink
github.comgithub.com/REYu6/iot/blob/main/CVE/dlink/DI_7001_MINI_5G.md/DI_7001_MINI_5G.md

Frequently asked

questions

It may be exploitable through a reachable device interface if that interface exposes the affected functionality. Exploitability depends on network exposure and access controls.

The available description does not establish a specific authentication requirement. Access sufficient to influence the flag parameter is the key prerequisite, and the required privileges depend on the device's interface configuration.

Avoid constructing shell commands from request data. Use fixed operations with direct, argument-separated APIs and strictly allowlist any values that must be user-selectable.

Review all data flows from management interfaces to process execution, enforce least privilege, reduce management exposure, and use static analysis and security testing to detect unsafe command construction.

Find out what's already
exploitable in your codebase.