/

CVE-2026-85223

Severity:

CRITICAL RISK

(9.9)

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

CVE-2026-85223

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-77, CWE-78

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.9)

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 in the D-Link DNS-340L CGI Handler allows commands supplied through request parameters to reach operating-system command execution paths. Because the affected CGI endpoint is remotely accessible, an attacker may be able to execute commands on the device without needing local access.

Affected context

The vulnerability occurs in the /cgi-bin/dropbox.cgi endpoint of D-Link DNS-340L firmware 1.01B04. It becomes risky when the CGI handler processes externally supplied values such as callback_url or sync_interval and incorporates them into operating-system command execution without sufficiently separating data from commands.

Exploit preconditions

  • Attack surface: The remotely reachable /cgi-bin/dropbox.cgi CGI endpoint
  • Required access: Network access to the device and any authentication or session access enforced by the deployment
  • Trigger point: Processing of the callback_url or sync_interval request arguments
  • Why exploitation is possible: User-controlled input may reach an operating-system command execution context without adequate command and argument separation

Why this happens

The underlying bug is an OS command injection flaw mapped primarily to CWE-78. The CGI handler appears to pass externally controlled parameter data into a system command or shell-invoking operation without reliably treating the values as inert data. This may allow command syntax embedded in input to alter the intended operation. CWE-77 is also related because the issue involves injection into a command construction or interpreter context.

Potential impact

  • An attacker could execute arbitrary commands with the privileges of the CGI service
  • The device could be compromised or rendered unavailable
  • Sensitive configuration data may be accessed or modified
  • Network-connected systems could be targeted for lateral movement
  • Device settings or stored data may be altered

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from request-processing paths and reducing the trust placed in CGI parameters.

Common defensive patterns include:

  • Prefer direct process or library APIs that pass arguments separately instead of invoking a shell
  • Apply strict allowlists and type validation for parameters such as URLs and intervals
  • Reject unexpected characters, formats, ranges, and encodings before command construction
  • Use fixed server-side values where client-controlled parameters are not necessary
  • Run CGI services with the least privileges required and restrict their access to sensitive resources
  • Add layered network controls so administrative CGI endpoints are not broadly exposed

How teams detect issues like this

Detection can combine:

  • Static analysis for shell invocation APIs, string-based command construction, and concatenation of request parameters into commands
  • Code review checks for CGI handlers that pass URL, timing, or synchronization fields into operating-system processes
  • Runtime monitoring for unusual child processes, shell launches, or command execution by the web-service account
  • Web application firewall and gateway policies that flag anomalous parameter values while avoiding reliance on filtering as the primary control
  • Automated security review tools and software composition checks that identify command-injection patterns

Sources

SourceLink
github.comgithub.com/dxz0069/WAVLINK-WN530H4-Command-Injection-in-set_add_routing/blob/main/DLINK-CMD-008-vulndb.md
vuldb.comvuldb.com/cve/CVE-2026-85223
vuldb.comvuldb.com/submit/894213
vuldb.comvuldb.com/vuln/398422
vuldb.comvuldb.com/vuln/398422/cti
dlink.comdlink.com/

Frequently asked

questions

Yes. The affected functionality is exposed through a CGI endpoint, so exploitation may be possible over the network when the endpoint is reachable and any required access controls can be satisfied.

The available description does not establish whether authentication is required. The practical prerequisite is access to the vulnerable CGI endpoint under the device's deployment and authorization controls.

Avoid passing request data to a shell. Use direct APIs with separate arguments, strict allowlist validation, and fixed server-side values wherever possible.

Review all CGI request parameters that influence process execution, enforce least privilege for service accounts, apply network restrictions, and use static analysis and runtime monitoring to detect command-construction risks.

Find out what's already
exploitable in your codebase.