/

CVE-2026-52356

Severity:

HIGH RISK

(8.8)

OS Command Injection (CWE-78): DAP1160L diagnostic.php

CVE-2026-52356

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Arbitrary Command Execution

Severity:

HIGH RISK

(8.8)

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 high-severity OS command injection vulnerability in the D-Link DAP1160L web diagnostic endpoint allows attacker-controlled input to reach shell command processing.

If the endpoint is reachable and accepts untrusted input, an attacker may execute arbitrary operating-system commands with the privileges of the web service.

A high-severity OS command injection vulnerability in the D-Link DAP1160L web diagnostic endpoint allows attacker-controlled input to reach shell command processing.

If the endpoint is reachable and accepts untrusted input, an attacker may execute arbitrary operating-system commands with the privileges of the web service.

Affected context

The vulnerability occurs in the /htdocs/web/diagnostic.php endpoint of D-Link DAP1160L A1 firmware. It becomes risky when externally influenced values are incorporated into diagnostic commands without sufficient separation from the shell interpreter, particularly when the web interface is reachable by an attacker.

The vulnerability occurs in the /htdocs/web/diagnostic.php endpoint of D-Link DAP1160L A1 firmware. It becomes risky when externally influenced values are incorporated into diagnostic commands without sufficient separation from the shell interpreter, particularly when the web interface is reachable by an attacker.

Exploit preconditions

  • Attack surface: The DAP1160L web management interface and its diagnostic endpoint
  • Required access: Network access to the endpoint and any authentication or authorization required by the device
  • Trigger point: Processing of attacker-controlled input by /htdocs/web/diagnostic.php
  • Why exploitation is possible: Input containing shell metacharacters may alter command interpretation and cause additional operating-system commands to run
  • Attack surface: The DAP1160L web management interface and its diagnostic endpoint
  • Required access: Network access to the endpoint and any authentication or authorization required by the device
  • Trigger point: Processing of attacker-controlled input by /htdocs/web/diagnostic.php
  • Why exploitation is possible: Input containing shell metacharacters may alter command interpretation and cause additional operating-system commands to run

Why this happens

The underlying bug is an OS command injection condition mapped to CWE-78. The application passes insufficiently constrained user-controlled data into a shell command or command-construction path, allowing shell metacharacters to change the intended command structure. The insecure pattern is treating request data as command syntax rather than as a strictly validated argument.

The underlying bug is an OS command injection condition mapped to CWE-78. The application passes insufficiently constrained user-controlled data into a shell command or command-construction path, allowing shell metacharacters to change the intended command structure. The insecure pattern is treating request data as command syntax rather than as a strictly validated argument.

Potential impact

  • An attacker may execute arbitrary commands on the device
  • Device configuration or diagnostic data could be modified
  • Network traffic or stored information could be exposed
  • The device may be disrupted or rendered unavailable
  • The compromised device could be used to affect other systems on its network
  • An attacker may execute arbitrary commands on the device
  • Device configuration or diagnostic data could be modified
  • Network traffic or stored information could be exposed
  • The device may be disrupted or rendered unavailable
  • The compromised device could be used to affect other systems on its network

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from diagnostic operations and reducing the trust placed in web request parameters.

Common defensive patterns include:

  • Prefer direct process-execution APIs that pass arguments separately instead of invoking a shell
  • Apply allowlist validation for diagnostic options and argument values
  • Reject unexpected characters, formats, and command structures before processing
  • Avoid concatenating request data into command strings
  • Run management services with the minimum privileges required
  • Restrict management interfaces to trusted networks and authenticated administrators
  • Add layered authorization and isolation controls around diagnostic functionality

Mitigation generally focuses on removing shell interpretation from diagnostic operations and reducing the trust placed in web request parameters.

Common defensive patterns include:

  • Prefer direct process-execution APIs that pass arguments separately instead of invoking a shell
  • Apply allowlist validation for diagnostic options and argument values
  • Reject unexpected characters, formats, and command structures before processing
  • Avoid concatenating request data into command strings
  • Run management services with the minimum privileges required
  • Restrict management interfaces to trusted networks and authenticated administrators
  • Add layered authorization and isolation controls around diagnostic functionality

How teams detect issues like this

Detection can combine source review, runtime monitoring, and interface policy checks:

  • Use static analysis rules to identify shell invocation APIs and string concatenation involving request parameters
  • Review diagnostic handlers for subprocess calls, command templates, and missing allowlist validation
  • Monitor web-service child processes and command execution originating from management endpoints
  • Log rejected inputs and unusual diagnostic requests without recording sensitive data
  • Enforce code-review policies requiring non-shell process APIs and explicit argument validation

Automated security review tools may help identify command construction patterns, but findings should be verified against the application's execution flow.

Detection can combine source review, runtime monitoring, and interface policy checks:

  • Use static analysis rules to identify shell invocation APIs and string concatenation involving request parameters
  • Review diagnostic handlers for subprocess calls, command templates, and missing allowlist validation
  • Monitor web-service child processes and command execution originating from management endpoints
  • Log rejected inputs and unusual diagnostic requests without recording sensitive data
  • Enforce code-review policies requiring non-shell process APIs and explicit argument validation

Automated security review tools may help identify command construction patterns, but findings should be verified against the application's execution flow.

Sources

SourceLink
github.comgithub.com/REYu6/iot/blob/main/CVE/dlink/DAP1160LA1_FW101WWb04/DAP1160LA1_FW101WWb04_RCE.md
dlink.comdlink.com/en/security-bulletin/

Frequently asked

questions

It may be remotely exploitable when the device's web management interface is reachable by an attacker and the diagnostic endpoint can be invoked with attacker-controlled input.

The description does not establish whether authentication is required. Exploitability depends on the device's access controls and whether an attacker can reach the endpoint with sufficient privileges.

Avoid shell-based command construction, use direct process APIs with fixed executable paths and separate arguments, and enforce strict allowlist validation for all diagnostic parameters.

Keep management interfaces restricted, apply least privilege to web services, review command-execution code paths, and use static analysis and code-review policies focused on CWE-78 patterns.

It may be remotely exploitable when the device's web management interface is reachable by an attacker and the diagnostic endpoint can be invoked with attacker-controlled input.

The description does not establish whether authentication is required. Exploitability depends on the device's access controls and whether an attacker can reach the endpoint with sufficient privileges.

Avoid shell-based command construction, use direct process APIs with fixed executable paths and separate arguments, and enforce strict allowlist validation for all diagnostic parameters.

Keep management interfaces restricted, apply least privilege to web services, review command-execution code paths, and use static analysis and code-review policies focused on CWE-78 patterns.

Find out what's already
exploitable in your codebase.