/

CVE-2026-72876

Severity:

CRITICAL RISK

(9.9)

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

CVE-2026-72876

Received

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78, CWE-639, CWE-862

Impact:

Cross-Tenant Remote Code 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 authorization and command-injection vulnerability in Dokploy's Swarm API allows a user with server:read permission to reference another organization's server. Under this condition, crafted node-related requests may cause arbitrary commands to run as the configured SSH user on the other tenant's server.

Affected context

The vulnerability occurs in Dokploy deployments where Swarm API procedures accept a serverId without verifying that it belongs to the caller's active organization. The affected node-information path also incorporates a supplied nodeId into a remote command execution operation, creating risk when cross-tenant resource references are accepted.

Exploit preconditions

  • Attack surface: Dokploy Swarm API procedures for node and application information
  • Required access: An authenticated account with server:read permission
  • Required condition: The caller must be able to submit a serverId belonging to another organization
  • Trigger point: Processing of the node-information request and construction of a remote execution command
  • Why exploitation is possible: Missing organization ownership checks permit cross-tenant resource access, while unsafely interpolated node identifiers can alter the command executed remotely

Why this happens

The issue combines broken object-level authorization with OS command injection. Several Swarm API procedures trust a supplied serverId without enforcing an active-organization ownership check, corresponding to CWE-639 and CWE-862. The node-information service then interpolates nodeId into a command passed to a remote execution helper. Treating request-controlled data as command syntax creates a CWE-78 condition in which input can affect shell behavior rather than remaining a strictly bounded argument.

Potential impact

  • An attacker may execute arbitrary commands as the configured SSH user
  • A tenant may access or modify another organization's server resources
  • Application data, credentials, or deployment configuration could be exposed
  • Compromised hosts could be used for lateral movement or service disruption
  • The vulnerability could enable cross-tenant data access and broader platform compromise

General mitigation guidance

Mitigation generally focuses on enforcing authorization before resource lookup

and eliminating shell interpretation of request-controlled values.

Common defensive patterns include:

  • Validate server ownership against the authenticated organization on every affected procedure
  • Centralize and consistently enforce object-level authorization checks
  • Pass command arguments through APIs that do not invoke a shell, rather than interpolating strings
  • Apply strict allowlists and type validation to node and server identifiers
  • Use dedicated, least-privileged SSH identities with narrowly scoped permissions
  • Separate tenant resources and limit the blast radius of remote execution
  • Treat authorization failures as deny-by-default and avoid relying only on client-side checks

How teams detect issues like this

Organizations commonly detect this class of issue through:

  • Static analysis rules for shell command construction using request-derived data
  • Code review checks for missing tenant or organization ownership validation
  • Tests that attempt cross-organization resource references with otherwise valid permissions
  • Runtime monitoring for unexpected remote commands and unusual SSH activity
  • API policy checks requiring authorization at every resource access boundary
  • Automated security review tools that flag command interpolation and inconsistent access-control enforcement

Sources

SourceLink
github.comgithub.com/Dokploy/dokploy/commit/5563699f71b2058b49eebdfd66c6c3dbd92ede9c
github.comgithub.com/Dokploy/dokploy/pull/4858
github.comgithub.com/Dokploy/dokploy/releases/tag/v0.29.13
github.comgithub.com/Dokploy/dokploy/security/advisories/GHSA-jj6h-388v-9rwm

Frequently asked

questions

It can be exploitable through the Dokploy API when an authenticated caller has

server:read permission and can submit references to another organization's

server resources.

No. The described condition requires the relevant read permission, not

necessarily administrative privileges. The key additional weakness is the

absence of an effective organization ownership check.

Enforce server ownership authorization before processing any node-related

request, and invoke remote commands with structured, non-shell argument

handling rather than interpolating identifiers into command strings.

Use centralized deny-by-default authorization, tenant-isolation tests, strict

input validation, command execution APIs that avoid shell parsing, and

least-privilege credentials for remote operations.

Find out what's already
exploitable in your codebase.