CVE-2026-72872 Overview
Dokploy is a free, self-hostable Platform as a Service (PaaS). A command injection vulnerability [CWE-78] exists in versions prior to 0.29.13. The application.saveBitbucketProvider function stores bitbucketOwner and bitbucketRepository fields without validation. The cloneBitbucketRepository function in packages/server/src/utils/providers/bitbucket.ts then interpolates these values directly into git clone commands executed through execAsync or execAsyncRemote. Any authenticated member with service deployment permission can execute arbitrary operating system commands on the Dokploy host or target server. The issue is fixed in version 0.29.13.
Critical Impact
Authenticated attackers with deployment permissions can achieve arbitrary OS command execution on Dokploy hosts and connected target servers, leading to full system compromise across the managed infrastructure.
Affected Products
- Dokploy versions prior to 0.29.13
- Self-hosted Dokploy PaaS deployments
- Dokploy-managed target servers reachable via execAsyncRemote
Discovery Timeline
- 2026-08-10 - CVE CVE-2026-72872 published to NVD
- 2026-08-13 - Last updated in NVD database
Technical Details for CVE-2026-72872
Vulnerability Analysis
The vulnerability is an OS command injection flaw in Dokploy's Bitbucket provider integration. Attackers with service deployment permissions can supply crafted values in the bitbucketOwner or bitbucketRepository fields when configuring a Bitbucket-backed application. Dokploy persists these values through application.saveBitbucketProvider without input validation or shell escaping.
When a deployment triggers cloneBitbucketRepository, Dokploy constructs a git clone command by interpolating the stored strings directly into a shell command line. The command is then handed to execAsync for local execution or execAsyncRemote for execution on a connected target server. Shell metacharacters embedded in the owner or repository fields break out of the intended git clone argument context and run attacker-controlled commands.
The attack scope changes because the injected commands may execute on remote target servers, not only the Dokploy host itself. This allows lateral impact across the managed PaaS environment from a single low-privileged deployment account.
Root Cause
The root cause is missing input sanitization combined with unsafe shell command construction. User-supplied repository metadata is concatenated into shell strings passed to child_process execution helpers without escaping. The patch introduces a shellWord helper from packages/server/src/utils/providers/utils.ts to properly escape untrusted input in bitbucket.ts and the shared git.ts provider.
Attack Vector
Exploitation requires network access to the Dokploy API and an authenticated account with service deployment permissions. The attacker configures a Bitbucket source for an application, supplying shell metacharacters in the owner or repository field. Triggering a deployment causes the malicious payload to be interpolated into git clone and executed by the underlying shell.
// Security patch in packages/server/src/utils/providers/bitbucket.ts
import type { InferResultType } from "@dokploy/server/types/with";
import { TRPCError } from "@trpc/server";
import type { z } from "zod";
+import { shellWord } from "./utils";
export type ApplicationWithBitbucket = InferResultType<
"applications",
// Security patch in packages/server/src/utils/providers/git.ts
updateSSHKeyById,
} from "@dokploy/server/services/ssh-key";
import { execAsync, execAsyncRemote } from "../process/execAsync";
+import { shellWord } from "./utils";
interface CloneGitRepository {
appName: string;
Source: GitHub Commit 47347ab. The patch imports a shellWord escaping helper and applies it to user-controlled values before interpolation into git clone invocations across all provider modules.
Detection Methods for CVE-2026-72872
Indicators of Compromise
- Unexpected child processes spawned by the Dokploy Node.js runtime beyond git, ssh, and standard clone tooling.
- Bitbucket provider records where bitbucketOwner or bitbucketRepository fields contain shell metacharacters such as `, $(, ;, &&, |, or newline characters.
- Deployment logs showing git clone invocations with malformed URLs or embedded command sequences.
- Outbound network connections from Dokploy hosts or target servers to unfamiliar destinations coinciding with deployment events.
Detection Strategies
- Audit the Dokploy database for applications rows whose Bitbucket owner or repository fields contain characters outside [A-Za-z0-9._-].
- Monitor process ancestry on Dokploy hosts for shell processes descending from the Dokploy service that execute non-git binaries.
- Review execAsyncRemote SSH sessions to target servers for command payloads that do not match expected deployment workflows.
- Correlate deployment API calls against user role membership to identify low-privileged deployment accounts issuing atypical clone requests.
Monitoring Recommendations
- Enable verbose logging of Dokploy deployment commands, including the fully constructed git clone command lines.
- Forward host and target-server process telemetry to a centralized analytics pipeline for anomaly analysis.
- Alert on any Dokploy-initiated process that reads sensitive files such as /etc/shadow, SSH keys, or cloud credentials.
- Track creation of new users, cron jobs, or systemd units on Dokploy-managed servers following deployment events.
How to Mitigate CVE-2026-72872
Immediate Actions Required
- Upgrade Dokploy to version 0.29.13 or later without delay.
- Review and revoke deployment permissions from any account that does not strictly require them.
- Audit existing Bitbucket provider configurations for suspicious owner or repository values and remove or correct any anomalies.
- Rotate credentials, API tokens, and SSH keys reachable from the Dokploy host and any managed target servers if compromise is suspected.
Patch Information
The fix is delivered in Dokploy release v0.29.13. The remediation is implemented in commit 47347ab via pull request #4855. Additional context is available in GitHub Security Advisory GHSA-grrj-6xrh-j6vp. The patch introduces a shellWord escaping helper applied to all user-controlled inputs used in git clone commands.
Workarounds
- Restrict service deployment permission to a minimal, trusted set of administrators until the upgrade is applied.
- Disable the Bitbucket provider integration if it is not required in the environment.
- Isolate the Dokploy host and target servers on a segmented network to limit blast radius during exploitation.
- Enforce input validation at a reverse proxy or WAF layer to reject requests containing shell metacharacters in Bitbucket provider fields.
# Upgrade Dokploy to the patched release
docker pull dokploy/dokploy:0.29.13
docker service update --image dokploy/dokploy:0.29.13 dokploy
# Verify running version
docker service inspect dokploy --format '{{.Spec.TaskTemplate.ContainerSpec.Image}}'
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

