/

CVE-2026-85224

Severity:

CRITICAL RISK

(9.1)

OS Command Injection (CWE-78) in D-Link DNS-320 File Sharing

CVE-2026-85224

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 in the D-Link DNS-320 ShareCenter file-sharing interface allows commands supplied through the fileurl argument to reach an operating-system command execution context.

Because the affected endpoint is remotely accessible, an attacker may execute commands with the privileges of the web service when the vulnerable request path is reachable.

Affected context

The vulnerability occurs in the File Sharing functionality exposed through /cgi/file_sharing.cgi on affected D-Link DNS-320 ShareCenter deployments. Risk is elevated when the endpoint is reachable over a network and user-controlled values in the fileurl argument are incorporated into operating-system commands without sufficient separation or validation.

Exploit preconditions

  • Attack surface: The remotely accessible File Sharing CGI endpoint
  • Required access: Network reachability to the affected service; authentication requirements may depend on deployment configuration
  • Trigger point: Processing of the fileurl argument by /cgi/file_sharing.cgi
  • Why exploitation is possible: Attacker-controlled input may be interpreted as part of an operating-system command rather than treated solely as file-sharing data

Why this happens

The underlying flaw is improper neutralization of special elements in an operating-system command, mapping primarily to CWE-78: Improper Neutralization of Special Elements used in an OS Command. The related CWE-77 classification reflects command construction concerns more broadly. The insecure pattern occurs when application input is concatenated into or otherwise influences a shell or system-command invocation without a safe argument boundary and strict validation.

Potential impact

  • An attacker may execute arbitrary commands on the NAS device
  • The device could be compromised or used to access stored files
  • Configuration, credentials, or shared data could be exposed or modified
  • The system could be used for persistence, disruption, or lateral movement
  • Connected users and services could be affected by malicious changes

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from file-sharing operations and reducing trust in request parameters.

Common defensive patterns include:

  • Prefer direct library or system APIs that accept structured arguments instead of shell commands
  • If an operating-system command is unavoidable, use fixed executable paths and strict argument boundaries
  • Apply allowlists for permitted file identifiers, paths, and operations
  • Canonicalize and validate file references before use
  • Run the web service with the least privilege needed for file-sharing functions
  • Restrict management and file-sharing interfaces to trusted network segments
  • Use filesystem permissions and service isolation to limit the consequences of compromise

How teams detect issues like this

Detection programs commonly look for:

  • Static-analysis findings involving shell execution APIs, command concatenation, and unsanitized CGI parameters
  • Code-review signals such as request values passed directly into process-spawning or shell interfaces
  • Runtime monitoring for unusual child processes launched by the web server or CGI service
  • Web-application logs containing unexpected command metacharacters or anomalous fileurl values
  • Network policies that restrict exposure of NAS administration and file-sharing endpoints

Automated security review tools can help identify command construction patterns, but findings should be validated against the actual execution path and deployment controls.

Sources

SourceLink
github.comgithub.com/dxz0069/WAVLINK-WN530H4-Command-Injection-in-set_add_routing/blob/main/DLINK-CMD-010-vulndb.md
vuldb.comvuldb.com/cve/CVE-2026-85224
vuldb.comvuldb.com/submit/894215
vuldb.comvuldb.com/vuln/398423
vuldb.comvuldb.com/vuln/398423/cti
dlink.comdlink.com/

Frequently asked

questions

Yes. The affected File Sharing CGI endpoint can be reached remotely when the service is exposed to an attacker. Practical exploitability still depends on network access controls and any authentication requirements.

The key prerequisite is the ability to send requests to the vulnerable endpoint. Whether authentication is required depends on the device's configuration and exposure.

Avoid passing user-controlled file references into shell commands. Use structured APIs, strict allowlists, safe argument handling, and least-privilege service execution.

Treat all CGI parameters as untrusted, enforce command-construction policies during code review, apply static analysis for shell execution patterns, and limit administrative interfaces to trusted networks.

Find out what's already
exploitable in your codebase.