/

CVE-2026-72902

Severity:

CRITICAL RISK

(9.9)

OS Command Injection (CWE-78) in Dokploy Registry API

CVE-2026-72902

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's registry testing functionality allows an authenticated user to execute arbitrary commands on a local or SSH-connected target server. The issue becomes risky when a registry password is incorporated into a shell command without safe argument handling.

Affected context

The vulnerability occurs in Dokploy's registry testing API routes, including registry.testRegistry and registry.testRegistryById, when they process registry credentials and contact a local or SSH-connected target server. Deployments may be exposed when an authenticated user can invoke these routes and supplied password data reaches a shell command through string interpolation.

Exploit preconditions

  • Attack surface: Dokploy registry testing API endpoints
  • Required access: An authenticated Dokploy account with permission to invoke the affected registry functionality
  • Trigger point: Processing a registry test request containing attacker-influenced credential data
  • Why exploitation is possible: The password value is interpolated into an execAsyncRemote shell command rather than passed through a safe command-construction path

Why this happens

The underlying bug is shell command construction from untrusted or insufficiently trusted input. By embedding the registry password directly into a command string, the application allows shell metacharacters or additional command syntax to be interpreted by the target shell. This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, commonly known as OS command injection.

Potential impact

  • An attacker may execute arbitrary operating-system commands on the local target
  • An attacker could execute commands on an SSH-connected target server
  • Application data, credentials, or deployment secrets may be exposed
  • The affected host could be modified, disrupted, or used for lateral movement
  • Containers, services, or deployment pipelines may be compromised

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from credential-handling workflows and reducing the trust placed in request data.

Common defensive patterns include:

  • Use structured process APIs that pass executable arguments separately instead of building shell command strings
  • Reuse safe command-construction helpers for registry authentication and connection testing
  • Treat passwords and other request fields as data, never as command fragments
  • Apply strict authorization checks and least-privilege permissions to registry testing operations
  • Restrict SSH targets and service-account capabilities to only the systems and actions required
  • Avoid exposing sensitive command output and credentials in logs or error messages
  • Isolate deployment workers and enforce network and filesystem boundaries where practical

How teams detect issues like this

Detection can include static analysis and review rules that flag shell execution APIs receiving interpolated request values, especially credential fields.

Code reviews should examine all paths that construct commands for local or SSH execution and verify that arguments are passed through structured APIs. Runtime monitoring can alert on unusual child processes, unexpected shell usage, or commands launched by the Dokploy service account. Policy enforcement may require approved process-execution wrappers, prohibit direct shell interpolation, and scan pull requests for unsafe command construction. Automated security review tools can help identify these patterns during development.

Sources

SourceLink
github.comgithub.com/Dokploy/dokploy/commit/d3f522b7a6f5100fc0fc0bff5851e48d11d459e2
github.comgithub.com/Dokploy/dokploy/pull/4875
github.comgithub.com/Dokploy/dokploy/releases/tag/v0.29.13
github.comgithub.com/Dokploy/dokploy/security/advisories/GHSA-w6r4-f26v-8g36

Frequently asked

questions

It can be reachable through Dokploy's application interface, but exploitation generally requires an authenticated user who can access the affected registry testing functionality.

A local server may be affected, and an SSH-connected target may also be at risk when Dokploy performs the registry test remotely.

Replace shell-string construction with structured process execution and safe argument handling, ensuring registry credentials are never interpreted by a shell.

Enforce least privilege, review every command-execution path, restrict reachable SSH targets, and use automated checks that detect interpolated user-controlled data in shell commands.

Find out what's already
exploitable in your codebase.