/

CVE-2026-85222

Severity:

CRITICAL RISK

(9.1)

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

CVE-2026-85222

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 command-injection vulnerability in the D-Link DNS-340L Add-On Center may allow a remote attacker to cause operating-system commands to execute through manipulated CGI parameters. The issue becomes risky when the affected CGI endpoint is network-reachable and insufficiently validates values supplied through f_name, f_url, f_flag, or f_login_user.

Affected context

The vulnerability is associated with the Add-On Center functionality in D-Link DNS-340L firmware 1.01B04, specifically the /cgi-bin/addon_center.cgi endpoint. It may exist where the endpoint is enabled or reachable and user-controlled parameter values are incorporated into operating-system command processing without adequate separation or validation.

Exploit preconditions

  • Attack surface: Network-accessible Add-On Center CGI endpoint
  • Required access: Ability to send requests to the affected endpoint; authentication requirements depend on device configuration
  • Trigger point: Processing of the f_name, f_url, f_flag, or f_login_user parameters
  • Why exploitation is possible: Input may reach command execution logic without reliable command-context separation or sufficiently strict validation

Why this happens

The underlying bug is an operating-system command injection flaw. The CGI handler appears to pass attacker-influenced parameter data into a shell or command-processing operation, allowing data intended as ordinary input to affect command interpretation.

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 Command as a related classification. The insecure pattern is constructing or invoking system commands from untrusted request values rather than using fixed command arguments and non-shell interfaces.

Potential impact

  • An attacker could execute arbitrary commands with the privileges of the affected service.
  • The device could be compromised or rendered unavailable.
  • Sensitive configuration, credentials, or stored data may be accessed.
  • The device could be used for network reconnaissance, persistence, or attacks against other systems.
  • Device integrity and availability could be disrupted.

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from request-driven operations and reducing trust in CGI input.

Common defensive patterns include:

  • Using fixed, allowlisted operations and direct process APIs that do not invoke a shell.
  • Treating all CGI parameters as untrusted and applying strict type, length, format, and character validation.
  • Separating data from command arguments rather than concatenating request values into command strings.
  • Restricting Add-On Center exposure to trusted management networks and disabling unnecessary remote access.
  • Running service processes with the minimum privileges required and limiting access to sensitive files and system operations.
  • Applying network segmentation and administrative access controls to reduce the consequences of device compromise.

How teams detect issues like this

Detection approaches may include:

  • Static analysis for shell invocation, command-string concatenation, and subprocess APIs fed by CGI parameters.
  • Code review checks for request values flowing into system, shell, or command-execution functions.
  • Runtime monitoring for unusual child processes, command interpreters, outbound connections, or changes initiated by the Add-On Center service.
  • Web-server and device-log review for anomalous requests involving the affected parameter names.
  • Policy enforcement requiring allowlisted command interfaces, input validation, and least-privilege execution.
  • Automated security scanning and neutral code-review tools can help identify command-injection data flows during development.

Sources

SourceLink
github.comgithub.com/dxz0069/WAVLINK-WN530H4-Command-Injection-in-set_add_routing/blob/main/DLINK-CMD-007-vulndb.md
vuldb.comvuldb.com/cve/CVE-2026-85222
vuldb.comvuldb.com/submit/894212
vuldb.comvuldb.com/vuln/398421
vuldb.comvuldb.com/vuln/398421/cti
dlink.comdlink.com/

Frequently asked

questions

Yes, the affected CGI endpoint is described as remotely reachable. Practical exploitability still depends on network exposure, authentication controls, and whether the Add-On Center functionality is enabled.

The attacker needs the ability to submit requests to the vulnerable endpoint. Whether authentication is required depends on the device's configuration and access controls.

Avoid passing request-controlled values to a shell. Use fixed operations, direct APIs, strict allowlists, and separately handled command arguments.

Treat CGI input as untrusted, enforce network isolation for management interfaces, review data flows into process execution, and run device services with minimal privileges.

Find out what's already
exploitable in your codebase.