/

CVE-2026-72862

Severity:

CRITICAL RISK

(9.9)

OS Command Injection (CWE-78) in Dokploy Database Services

CVE-2026-72862

Received

Vulnerability type

Category:

OS Command Injection

CWE:

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

Dokploy contains an operating system command injection vulnerability in database service deployment functions that incorporate user-controlled Docker image values into remote shell commands without adequate quoting.

An attacker who can control the relevant image configuration may execute arbitrary commands on the remote server, potentially causing full server compromise.

Affected context

The vulnerability occurs in Dokploy database service deployment workflows for MariaDB, MongoDB, MySQL, PostgreSQL, Redis, and LibSQL when the remote-server execution path constructs Docker commands from user-controlled image fields. Risk depends on whether an attacker can submit or modify deployment configuration and whether the affected service runs with permissions that allow access to sensitive host or platform resources.

Exploit preconditions

  • Attack surface: Remote-server database service deployment functionality
  • Required access: Ability to create, modify, or trigger a deployment containing a controlled Docker image value
  • Trigger point: Construction and execution of the Docker pull command during service deployment
  • Why exploitation is possible: The image value is passed unquoted into a shell command, allowing shell metacharacters or command syntax to alter the intended command

Why this happens

The underlying bug is command construction from untrusted input without strict argument separation or safe process execution.

The affected deployment functions interpolate the user-controlled dockerImage field directly into a shell command. This insecure pattern allows input intended as a Docker image reference to be interpreted by the shell as command syntax, mapping to CWE-78: Improper Neutralization of Special Elements used in an OS Command.

Potential impact

  • An attacker may execute arbitrary commands on the remote server
  • The Dokploy host or deployment worker could be compromised
  • Deployment credentials, environment variables, and application secrets could be exposed
  • Attackers could modify or delete hosted services and data
  • The compromised server could be used for lateral movement or persistence

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from deployment command execution and reducing trust in image configuration.

Common defensive patterns include:

  • Invoking container tooling through structured argument arrays rather than shell-interpolated command strings
  • Validating Docker image references against a strict grammar and approved registries
  • Rejecting unexpected characters, separators, and shell control syntax
  • Using secure-by-default deployment APIs that do not invoke a shell
  • Separating user-controlled configuration from privileged deployment operations
  • Running deployment workers with least-privilege accounts and narrowly scoped credentials
  • Restricting network, filesystem, and container permissions available to deployment processes

How teams detect issues like this

Organizations can look for:

  • Static analysis findings involving shell command construction, string interpolation, or process execution APIs
  • Code review signals where request or configuration fields flow into docker, sh, or command runner calls
  • Tests that verify image-reference validation and confirm shell metacharacters cannot alter process arguments
  • Runtime monitoring for unexpected Docker commands, child processes, outbound connections, or changes to deployment files
  • Policy enforcement requiring approved image registries and structured subprocess APIs

Automated security review tools may help identify tainted data flows into shell execution paths.

Sources

SourceLink
github.comgithub.com/Dokploy/dokploy/commit/b24202e69b244f0ece8d2f56e99cad9bb5e1a248
github.comgithub.com/Dokploy/dokploy/releases/tag/v0.29.13
github.comgithub.com/Dokploy/dokploy/security/advisories/GHSA-6jrh-8qmg-jj3p

Frequently asked

questions

It can be remotely exploitable when Dokploy exposes deployment functionality to an attacker who can control database service configuration or trigger deployments.

The key requirement is permission to provide or modify the Docker image value used by an affected deployment path. The practical impact also depends on the privileges of the remote deployment account.

Avoid shell-interpolated commands entirely. Use structured process execution with validated image references and explicit argument boundaries.

Treat deployment fields as untrusted input, enforce strict allowlists or image-reference grammars, use least privilege, and add static analysis and regression tests for command-injection data flows.

Find out what's already
exploitable in your codebase.