/

CVE-2026-72740

Severity:

CRITICAL RISK

(9.9)

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

CVE-2026-72740

Received

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Arbitrary 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

A critical OS command injection vulnerability in Dokploy allows an authenticated member with service deployment permission and an attached SSH key to influence a deployment command through a custom Git URL. When the Git provider processes the URL, unquoted domain data is incorporated into an ssh-keyscan command, which may allow arbitrary commands to execute on the Dokploy host.

Affected context

The issue occurs in Dokploy's Git provider handling for custom SSH-based Git URLs. It becomes risky when a user can deploy a service, provide or control a custom Git URL, and has an SSH key attached to their account or deployment configuration. The vulnerable command construction is reached during deployment while the target host is added to known-hosts data.

Exploit preconditions

  • Attack surface: Dokploy service deployment and custom Git provider configuration
  • Required access: An authenticated member with permission to deploy services
  • Additional condition: An SSH key must be attached or available for the deployment workflow
  • Trigger point: Processing a custom Git URL and executing the generated ssh-keyscan command
  • Why exploitation is possible: User-controlled domain data is interpolated into a shell command without adequate shell quoting

Why this happens

The vulnerability results from constructing a shell command with attacker-influenced Git URL data and failing to quote the interpolated domain safely. Shell metacharacters or command syntax embedded in that data may be interpreted by the host shell instead of being treated as ordinary input. This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, commonly called OS command injection.

Potential impact

  • An attacker may execute arbitrary commands on the Dokploy host
  • The application runtime and deployment environment could be compromised
  • Deployment secrets, source code, or service credentials may be exposed
  • Attackers could alter deployed applications or deployment configuration
  • The host could be used for lateral movement or further infrastructure compromise

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from deployment workflows and reducing trust in user-controlled repository data.

Common defensive patterns include:

  • Prefer direct process-execution APIs that pass arguments separately rather than invoking a shell
  • Apply strict validation and allowlisting to Git URL schemes, hosts, ports, and path formats
  • Use robust argument escaping when a shell invocation cannot be avoided
  • Keep deployment identities and host privileges limited to the resources they require
  • Isolate deployment workers from sensitive host and control-plane interfaces
  • Avoid exposing private keys or broad credentials to processes that handle user-controlled repository URLs

How teams detect issues like this

Organizations can look for:

  • Static analysis findings involving shell execution APIs and string interpolation
  • Code review signals where URLs, hostnames, or paths are concatenated into command strings
  • Deployment logs showing unexpected ssh-keyscan, shell, or process execution failures
  • Policy checks that require argument-array process execution for external commands
  • Runtime monitoring for unusual child processes, network connections, or file changes by Dokploy services

Automated security review tools may help identify unquoted command construction and user-controlled data flows.

Sources

SourceLink
github.comgithub.com/Dokploy/dokploy/commit/47347ab885b0ad1f5d0ef0e5e74bbba35c7f93bc
github.comgithub.com/Dokploy/dokploy/releases/tag/v0.29.13
github.comgithub.com/Dokploy/dokploy/security/advisories/GHSA-6693-xv3f-69px

Frequently asked

questions

Exploitation generally requires an authenticated Dokploy member with permission to deploy a service, an attached SSH key, and the ability to supply or influence a custom Git URL.

No. The described attack path depends on authenticated deployment access and the relevant Git deployment configuration.

Avoid shell command construction for Git and host-key operations. Use direct process APIs with separately supplied arguments, combined with strict validation and allowlisting.

Treat repository URLs and hostnames as untrusted input, prohibit string interpolation into shell commands, apply least privilege, and enforce static analysis and code-review policies for process execution.

Find out what's already
exploitable in your codebase.