/

CVE-2026-82691

Severity:

CRITICAL RISK

(9.1)

OS Command Injection (CWE-78) in D-Link DNS-320L CGI

CVE-2026-82691

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-77, CWE-78

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.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 critical OS command injection vulnerability affects the CGI handler used by certain D-Link DNS storage appliances. A remote attacker may be able to manipulate the f_ups_ip argument and cause commands to execute on the device when the vulnerable functionality is reachable and accepts attacker-controlled input.

Affected context

The issue is associated with the /cgi-bin/usb_device.cgi endpoint on D-Link DNS-320L, DNS-327L, DNS-340L, and DNS-345 devices within the affected product range. Risk depends on whether the CGI handler is exposed to an attacker and whether the f_ups_ip parameter reaches command-processing logic without adequate validation or safe separation from the operating system shell.

Exploit preconditions

  • Attack surface: The remotely reachable CGI handler at /cgi-bin/usb_device.cgi
  • Required access: Network access to the affected device and sufficient ability to submit requests to the handler
  • Trigger point: Processing of attacker-controlled input supplied through the f_ups_ip argument
  • Why exploitation is possible: Input may be incorporated into an operating-system command without robust validation, neutralization, or use of a shell-independent process interface

Why this happens

The underlying defect is an OS command injection condition. Data received through a CGI parameter is apparently allowed to influence command construction or execution, enabling shell metacharacters or command syntax to alter the intended operation. This maps primarily to CWE-78: Improper Neutralization of Special Elements used in an OS Command, with CWE-77: Improper Neutralization of Special Elements in Output Used by a Downstream Component also relevant to unsafe command composition.

Potential impact

  • An attacker may execute arbitrary commands with the privileges of the CGI process.
  • The device could be compromised or made unavailable.
  • Stored data, credentials, or configuration may be exposed or altered.
  • The device could be used for lateral movement or participation in additional attacks.
  • Network services and connected storage resources could be disrupted.

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from request processing and reducing trust in network-supplied parameters.

Common defensive patterns include:

  • Using direct, shell-independent APIs with fixed executable paths and separate argument arrays.
  • Applying strict allowlist validation for parameters that represent addresses or device configuration values.
  • Rejecting unexpected encodings, delimiters, control characters, and out-of-range values before business logic runs.
  • Restricting administrative CGI interfaces to trusted management networks and applying least-privilege service accounts.
  • Disabling unnecessary remote management exposure and limiting access through network policy controls.
  • Separating device-management privileges from broader system and storage permissions where possible.

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules that flag string concatenation, formatting, or interpolation into shell execution APIs.
  • Code review checks for CGI parameters passed to command interpreters or process-spawning functions.
  • Tests confirming that input is validated as a typed value and passed through a shell-independent execution path.
  • Web and device logs showing unusual requests to the CGI endpoint, malformed address values, command separators, or unexpected process activity.
  • Network monitoring and policy enforcement that restrict access to management interfaces and alert on administrative endpoints exposed beyond intended zones.

Automated security review tools may help identify unsafe command construction patterns, but findings should be validated against the actual device execution path.

Sources

SourceLink
github.comgithub.com/dxz0069/WAVLINK-WN530H4-Command-Injection-in-set_add_routing/blob/main/DLINK-CMD-005-vulndb.md
vuldb.comvuldb.com/cve/CVE-2026-82691
vuldb.comvuldb.com/submit/894210
vuldb.comvuldb.com/vuln/397179
vuldb.comvuldb.com/vuln/397179/cti
dlink.comdlink.com/

Frequently asked

questions

The reported issue describes a remote attack path. Exploitability still depends on network reachability of the CGI handler and the device's authentication and access-control configuration.

The attacker generally needs network access to the affected management interface and the ability to submit a request that reaches the vulnerable parameter-processing logic. The exact authentication requirement depends on the deployment.

Avoid passing request data to a shell. Validate the value against a strict expected format and invoke only fixed commands through shell-independent process APIs with minimal privileges.

Treat all CGI and API parameters as untrusted, use allowlist validation, enforce management-network restrictions, review command execution paths during development, and monitor administrative interfaces for abnormal requests.

Find out what's already
exploitable in your codebase.