/

CVE-2026-72867

Severity:

CRITICAL RISK

(9.9)

OS Command Injection (CWE-78) in Dokploy Git Deploy

CVE-2026-72867

Received

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-20, CWE-78, CWE-602

Impact:

Arbitrary Host Command 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 incomplete server-side validation fix for Git branch fields, allowing a low-privileged authenticated user to store a malicious branch value. When a deployment uses that value in shell-based Git commands, the attacker may execute arbitrary commands on the Dokploy host.

Affected context

The vulnerability affects Dokploy deployments in the impacted release range when branch-related fields accepted by the compose update workflow are not validated on the server. A subsequent compose deployment can pass values such as custom Git, GitHub, GitLab, Bitbucket, or Gitea branches into shell-based Git provider commands.

Exploit preconditions

  • Attack surface: Authenticated compose management and deployment functionality
  • Required access: A low-privileged authenticated account able to update compose configuration and trigger deployment
  • Trigger point: Git clone or repository deployment commands executed during compose.deploy
  • Why exploitation is possible: Branch values stored without adequate server-side validation are later incorporated into shell command execution paths

Why this happens

The underlying issue is an incomplete input-validation boundary. The application accepts branch-related values through a direct update request, but does not sufficiently validate them before they reach shell-based Git operations.

Treating user-controlled branch data as command input creates an OS command injection condition, mapping primarily to CWE-78. The missing server-side validation also relates to CWE-20, while relying on client-side or incomplete validation reflects CWE-602.

Potential impact

  • An attacker may execute arbitrary commands on the Dokploy host
  • A deployment worker or service account could be compromised
  • Application secrets, repository credentials, or environment variables could be exposed
  • Hosted applications and deployment infrastructure could be modified or disrupted
  • The compromised host could be used for lateral movement or supply-chain manipulation

General mitigation guidance

Mitigation generally focuses on ensuring that repository and branch metadata remains data rather than shell syntax.

Common defensive patterns include:

  • Enforcing strict server-side allowlists and format validation for branch values
  • Avoiding shell interpretation by using argument-safe process APIs
  • Separating Git command construction from untrusted input
  • Applying validation consistently across every provider-specific deployment path
  • Treating client-side validation as supplementary rather than authoritative
  • Running deployment services with least privilege and isolating them from sensitive host resources
  • Restricting access to compose updates and deployment triggers according to operational need

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules that identify shell execution with request-derived or database-derived arguments
  • Code review checks for direct string interpolation in Git and process-launch commands
  • Tests that submit malformed, metacharacter-containing, and unexpected branch values through API paths
  • Policy enforcement requiring centralized server-side validation for repository metadata
  • Runtime monitoring for unexpected child processes, unusual Git arguments, and deployments initiated by low-privileged accounts

Automated security review tools may help identify shell construction patterns, but findings should be confirmed across all provider integrations.

Sources

SourceLink
github.comgithub.com/Dokploy/dokploy/commit/47347ab885b0ad1f5d0ef0e5e74bbba35c7f93bc
github.comgithub.com/Dokploy/dokploy/pull/4855
github.comgithub.com/Dokploy/dokploy/releases/tag/v0.29.13
github.comgithub.com/Dokploy/dokploy/security/advisories/GHSA-cg8g-x23v-5fw8

Frequently asked

questions

It can be exploitable through Dokploy's authenticated API and deployment workflows when an attacker can submit branch values and trigger a deployment. The exact exposure depends on account permissions and network access controls.

Exploitation requires an authenticated account with sufficient permissions to update compose data and invoke deployment functionality. Anonymous access is not the stated prerequisite.

Validate branch fields on the server using strict, provider-appropriate rules and invoke Git through APIs that pass arguments without shell interpretation. Validation should occur before values are stored and again at execution boundaries where appropriate.

Centralize input validation, prohibit shell-based command construction with untrusted data, test every provider-specific path, and run deployment components with minimal privileges.

Find out what's already
exploitable in your codebase.