/

CVE-2026-13545

Severity:

HIGH RISK

(8.8)

OS Command Injection (CWE-78) in D-Link DCS-935L Camera

CVE-2026-13545

Analyzed

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-77, CWE-78

Impact:

Remote Code Execution on Embedded Device

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 command injection vulnerability in the D-Link DCS-935L camera allows crafted POST requests to the setconf.cgi endpoint to inject operating system commands via the UID parameter.

When the device processes untrusted UID input in shell commands, a remote attacker can execute arbitrary code on the camera, especially in deployments exposed to the internet or untrusted networks.

Affected context

This vulnerability occurs within the web management interface of the D-Link DCS-935L IP camera when the setconf.cgi script handles POST parameters.

It is relevant in environments where:

  • The camera's HTTP interface is reachable from untrusted networks
  • User-controlled parameters (such as UID) are passed into system-level operations
  • Input validation or shell escaping is weak or absent in CGI handlers like sub_400E40

The risk is higher when default credentials, weak authentication, or exposed admin interfaces are present.

Exploit preconditions

  • Attack surface: HTTP/HTTPS interface of the D-Link DCS-935L camera
  • Required access: Ability to send crafted POST requests to setconf.cgi (typically via network reachability; authentication requirements depend on deployment configuration)
  • Trigger point: Processing of the UID POST parameter within the sub_400E40 handler, where its value is incorporated into OS-level command execution
  • Why exploitation is possible: The UID parameter is concatenated or interpolated into shell commands without proper neutralization of special characters or strict validation, enabling attackers to break out of the intended command and append arbitrary instructions

Why this happens

The bug stems from treating user-supplied data as trusted input in shell-level operations inside the CGI script.

In sub_400E40, the UID parameter is likely assembled into a command string and passed to an OS execution primitive (for example, system(), popen(), or equivalent) without robust sanitization or strict whitelisting.

This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command (OS Command Injection) and is closely related to CWE-77: Improper Neutralization of Special Elements used in a Command, where shell metacharacters give attackers control over additional command segments.

Abstractly, the insecure pattern is any use of dynamic string-based command construction where adversary-controlled data can influence the command interpreter.

Potential impact

  • Remote attackers may execute arbitrary OS commands on the camera.
  • Attackers could modify device configuration or disable security settings.
  • The device can be co-opted into botnets or used as a foothold inside the local network.
  • Sensitive information, such as network details or video streams, could be accessed or exfiltrated.
  • The camera's firmware or filesystem may be tampered with, affecting integrity and availability.

General mitigation guidance

Effective mitigation focuses on eliminating direct shell command construction with untrusted data and enforcing strict input handling patterns.

Recommended secure design approaches include:

  • Replacing shell-based operations with safer, parameterized APIs that do not invoke a command interpreter.
  • Applying strict validation and whitelisting to POST parameters like UID, limiting them to known-safe formats (e.g., alphanumeric, fixed length).
  • Normalizing and rejecting input containing shell metacharacters, redirection operators, or command separators.
  • Implementing least-privilege execution for web-facing components so that, even if a command is abused, its impact is constrained.
  • Designing configuration handlers so that user inputs are treated as data only, never as part of executable command strings.

How teams detect issues like this

Detection generally involves both code-centric and operational techniques:

  • Static analysis rules targeting functions that build command strings from request parameters (e.g., concatenation of UID into system() or popen() calls).
  • Code reviews focused on CGI handlers and router/camera web interfaces, looking for direct use of user input in OS commands without validation.
  • Security testing with fuzzing or targeted penetration tests that send crafted POST parameters to endpoints like setconf.cgi to identify command injection behavior.
  • Policy-based checks in CI/CD pipelines that flag use of shell invocation APIs combined with network-facing input sources.
  • Behavioral monitoring of deployed devices for unusual outbound connections, high resource usage, or unexpected command executions indicative of compromise.

Sources

SourceLink
github.comgithub.com/Real-Simplicity/cve-database/tree/main/CVE_Report_DLink_DCS935L_Command_Injection
vuldb.comvuldb.com/cve/CVE-2026-13545
vuldb.comvuldb.com/submit/842589
vuldb.comvuldb.com/vuln/374553
vuldb.comvuldb.com/vuln/374553/cti
dlink.comdlink.com/

Frequently asked

questions

It is remotely exploitable wherever the D-Link DCS-935L web interface is reachable, especially if authentication is weak or disabled. Attackers only need network access to send crafted POST requests to the vulnerable endpoint.

At minimum, network-level access to the camera's HTTP service is required. Depending on configuration, they may also need valid credentials; however, in many consumer deployments, interfaces are exposed with default or weak authentication, reducing the barrier to exploitation.

Remove or refactor any logic that builds shell commands from user-controlled input. Use parameterized, non-shell APIs for system operations and enforce strict whitelisting on configuration parameters so that external data cannot influence command interpreters.

Adopt secure coding guidelines for embedded web components that prohibit dynamic shell command construction with request data, integrate static analysis and security review into development, and design configuration endpoints with strong input validation, least privilege, and defense-in-depth controls around command execution paths.

Find out what's already
exploitable in your codebase.