/

CVE-2026-72736

Severity:

CRITICAL RISK

(9.9)

OS Command Injection (CWE-77) in Dokploy PaaS Remote

CVE-2026-72736

Received

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-77

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 passes user-controlled values into shell commands without adequate quoting in registry credential testing and Docker Swarm cluster management endpoints. When the vulnerable remote execution path is used, an attacker may execute arbitrary commands on the remote host, potentially resulting in full service or infrastructure compromise.

Affected context

The vulnerability occurs in Dokploy deployments where registry credential testing or Docker Swarm cluster management requests reach the remote execution path. Risk is present when attacker-controlled values are interpolated into shell command strings that are executed through SSH, rather than being passed as safely separated arguments or handled through a structured API.

Exploit preconditions

  • Attack surface: Registry credential testing and Docker Swarm cluster management endpoints
  • Required access: Access sufficient to submit or influence values processed by one of the affected endpoints
  • Trigger point: Construction and remote execution of a shell command through the SSH-backed execution path
  • Why exploitation is possible: User-controlled values are inserted into shell command strings without reliable quoting or argument isolation

Why this happens

The underlying bug is command construction through unquoted template-literal interpolation. Data supplied by a user is treated as part of a shell program instead of as a data argument, allowing shell metacharacters or command separators to alter the intended command.

This behavior maps to CWE-77: Improper Neutralization of Special Elements used in a Command, commonly called OS command injection. Although safer local code paths exist, the remote path invokes a shell through SSH, preserving the injection risk when untrusted values reach that path.

Potential impact

  • An attacker may execute arbitrary operating-system commands on the remote host.
  • The attacker could access application secrets, registry credentials, or deployment data.
  • A compromised host may be used for lateral movement within the infrastructure.
  • Service availability, deployed workloads, or Docker Swarm configuration could be disrupted.
  • The vulnerability can lead to broader platform or supply-chain compromise depending on execution privileges.

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from application-controlled operations and reducing the trust placed in endpoint input.

Common defensive patterns include:

  • Prefer structured APIs, such as the Docker API, over shell commands for container and cluster management.
  • Use process execution interfaces that pass executable names and arguments separately, without invoking a shell.
  • Apply strict allowlists and type-aware validation to registry, host, credential, and cluster parameters.
  • Avoid interpolating user-controlled values into command strings; use safe argument escaping only where a shell is unavoidable.
  • Run remote management operations with dedicated low-privilege identities and narrowly scoped permissions.
  • Restrict SSH access, isolate management hosts, and avoid exposing administrative endpoints unnecessarily.
  • Keep secrets out of command arguments and process listings, using protected secret-management mechanisms instead.

How teams detect issues like this

High-level detection can include:

  • Static analysis rules identifying template interpolation, string concatenation, or formatting used to build shell commands.
  • Code review checks for shell-backed execution helpers, SSH command construction, and missing argument boundaries.
  • Tests that submit shell metacharacters as inert validation values and verify that no additional command is executed.
  • Runtime monitoring for unexpected child processes, unusual SSH commands, and administrative actions originating from Dokploy services.
  • Policy enforcement that restricts use of shell execution APIs and requires approved structured management interfaces.
  • Automated security review tools may help identify command construction paths, but findings should be validated against actual execution behavior.

Sources

SourceLink
github.comgithub.com/Dokploy/dokploy/commit/df2779eaeb4a58f0c85d4caa713c776c790fa708
github.comgithub.com/Dokploy/dokploy/releases/tag/v0.29.13
github.comgithub.com/Dokploy/dokploy/security/advisories/GHSA-4mfc-grxw-6858

Frequently asked

questions

It may be exploitable through network-accessible Dokploy endpoints when an attacker can authenticate or otherwise obtain the permissions needed to submit values processed by the affected operations. The exact scope depends on endpoint exposure and authorization controls.

The attacker generally needs access to a registry testing or Docker Swarm management operation and influence over one or more values included in the remote command. The resulting impact also depends on the privileges of the SSH or service account.

Replace shell command construction with structured APIs or argument-separated process execution. Treat all endpoint values as data, enforce allowlist validation, and avoid invoking a shell for administrative operations.

Use secure-by-default execution libraries, review all remote command helpers, apply least privilege to management identities, add injection-focused tests, and enforce code policies that prohibit untrusted interpolation into shell strings.

Find out what's already
exploitable in your codebase.