/

CVE-2026-45663

Severity:

CRITICAL RISK

(9.9)

Command Injection in Dokploy Docker File Upload Path

CVE-2026-45663

Deferred

Vulnerability type

Category:

Command Injection

CWE:

CWE-77

Impact:

Remote Code Execution on Host

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

Dokploy's Docker file upload feature in versions 0.29.1 and earlier fails to sanitize the destinationPath parameter before embedding it into a shell command.

An authenticated user can inject shell metacharacters into this parameter, escape the intended docker cp command, and execute arbitrary operating system commands on the Dokploy host.

Affected context

This vulnerability arises in Dokploy deployments that expose the Docker file upload functionality to authenticated users.

The application constructs a shell command (e.g., wrapping docker cp) using the user-supplied destinationPath parameter without robust validation or escaping.

Any environment where this feature is available—such as multi-tenant self-hosted PaaS setups or shared internal platforms—may be affected, particularly when users can supply arbitrary upload destinations.

Exploit preconditions

  • Attack surface: HTTP(S) interface for Dokploy's file upload to containers
  • Required access: Valid authenticated Dokploy account with permission to upload files to a container
  • Trigger point: Submission of a crafted destinationPath value containing shell metacharacters (e.g., ;, &&, or unescaped quotes) during file upload
  • Why exploitation is possible: The backend directly interpolates destinationPath into a shell command string passed to a system shell, allowing user-controlled data to break out of the intended docker cp context and execute arbitrary commands

Why this happens

The bug stems from constructing shell commands by concatenating user-controlled input without strict validation or proper escaping.

Instead of calling process execution APIs with structured argument lists, the implementation uses a shell interpreter, which treats characters like ;, &&, and quotes as control operators.

This pattern maps directly to CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), where an application fails to neutralize or constrain special shell syntax embedded in externally supplied data.

Potential impact

  • Arbitrary command execution on the Dokploy host operating system
  • Compromise of the host machine running Dokploy and its Docker daemon
  • Access to or modification of other containers, images, and volumes managed by Dokploy
  • Extraction of sensitive data such as environment variables, secrets, configuration files, or access tokens
  • Use of the compromised host as a pivot point for lateral movement within the network
  • Denial of service by stopping containers, consuming resources, or tampering with Dokploy's runtime environment

General mitigation guidance

Mitigation focuses on eliminating shell-based construction of commands and constraining user input used in process execution:

  • Prefer direct invocation of Docker or OS commands using APIs or libraries that accept argument arrays, avoiding any intermediate shell.
  • Enforce strict validation on destinationPath, allowing only expected patterns (e.g., normalized paths without metacharacters, limited to specific directories or formats).
  • Apply robust escaping or quoting routines only as a secondary safeguard, ensuring shell special characters cannot alter command structure.
  • Run Dokploy components and associated Docker operations under least-privilege accounts, limiting the blast radius of a compromise.
  • Introduce strict multi-tenant isolation controls, separating workloads by project, namespace, or host where feasible.
  • Implement secure defaults for file upload paths and disallow arbitrary path specification when not strictly needed.

How teams detect issues like this

Detection can combine preventative code analysis with runtime monitoring:

  • Static analysis: Configure rules or linters to flag use of shell-based execution APIs (e.g., sh, bash, system, exec with string commands) that include interpolated user input, especially around Docker management code.
  • Code review: Require security-focused review for features that invoke external commands, checking for concatenated command strings, unvalidated parameters, and improper handling of paths or filenames.
  • Policy enforcement: Establish internal guidelines banning shell invocation for Docker operations; enforce via pull request templates, checklists, and CI gates.
  • Runtime monitoring: Use host-based intrusion detection or logging to watch for unusual shell processes spawned by Dokploy, suspicious docker invocations, or unexpected commands executed under the Dokploy service account.

Sources

SourceLink
github.comgithub.com/Dokploy/dokploy/security/advisories/GHSA-9m66-74x3-5mwr

Frequently asked

questions

Exploitability is limited to users who can authenticate to Dokploy and access the Docker file upload functionality, but within that scope it is highly impactful because it allows arbitrary command execution on the host.

No elevated system privileges are required beyond a standard authenticated Dokploy account with file upload rights. Network-level access is only needed to reach the Dokploy interface over HTTP(S).

The most robust fix is to remove shell interpretation from the workflow: invoke Docker or OS commands via APIs or parameterized process execution functions that take argument lists, and strictly validate any user-supplied paths before use.

Adopt a policy of never building shell command strings from user input, enforce rigorous input validation and allowlists for all parameters used in external commands, include security checks for command execution patterns in code review and CI, and provide developers with secure abstraction layers for interacting with Docker and the OS.

Find out what's already
exploitable in your codebase.