/

CVE-2026-72735

Severity:

CRITICAL RISK

(9.9)

OS Command Injection (CWE-77) in Dokploy Traefik Config

CVE-2026-72735

Received

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-77

Impact:

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

Dokploy contains a command injection vulnerability in the handling of user-controlled Traefik configuration. An attacker who can influence affected configuration fields may execute arbitrary operating-system commands on managed remote servers with the privileges of the configured SSH user.

Affected context

The issue occurs in Dokploy's remote Traefik configuration workflow when YAML generated from user-controlled values is embedded in a shell command and executed on a managed server. Risk is present where attackers can influence redirect rules, replacement values, authentication usernames, domain hosts, or middleware settings, and the deployment uses an SSH account with meaningful permissions.

Exploit preconditions

  • Attack surface: Remote server configuration through Dokploy's Traefik management functionality
  • Required access: Ability to create or modify the affected Traefik configuration values
  • Trigger point: Execution of the generated remote configuration command
  • Why exploitation is possible: Serialized user input is interpolated into shell command text without complete shell-safe escaping, allowing shell metacharacters and quoting boundaries to alter command interpretation

Why this happens

The vulnerability results from constructing a shell command by interpolating serialized, user-controlled YAML into an echo command executed remotely. YAML serialization does not provide shell-command escaping, so values containing shell-significant characters can escape the intended quoting context and be interpreted as additional shell syntax. This is an OS command injection weakness under CWE-77, compounded by an incomplete remediation that did not protect every user-controlled configuration field.

Potential impact

  • Attackers may execute arbitrary commands on managed remote servers
  • The commands could run with the privileges of the configured SSH user
  • Confidential application data or deployment secrets may be exposed
  • Attackers could modify services, configurations, or stored data
  • Compromised hosts may be used for lateral movement or persistence

General mitigation guidance

Mitigation typically focuses on eliminating shell interpretation from remote configuration workflows and reducing trust in user-controlled values.

Common defensive patterns include:

  • Use direct process execution or structured remote APIs instead of shell command construction
  • Pass configuration through safely handled files, standard input, or argument arrays rather than interpolated command strings
  • Apply context-appropriate shell escaping when a shell cannot be avoided
  • Validate Traefik fields against strict schemas and allowlists for expected formats
  • Treat serialized YAML as data, not as a security boundary for command execution
  • Use dedicated, least-privileged SSH accounts with restricted filesystem and service permissions
  • Limit which users or tenants can alter remote routing and middleware configuration

How teams detect issues like this

High-level detection can include:

  • Static analysis rules that flag string interpolation or concatenation used to build shell commands
  • Code review checks for exec, remote command helpers, and shell invocation with serialized user input
  • Searches for generated command strings containing configuration variables or YAML output
  • Runtime monitoring for unexpected child processes launched by deployment services
  • Audit logging of remote command execution and changes to Traefik configuration
  • CI policy checks requiring structured process APIs or approved escaping utilities

Automated code review and software composition tools may help identify command-construction patterns, but findings should be validated against actual trust boundaries.

Sources

SourceLink
github.comgithub.com/Dokploy/dokploy/commit/92310ddb143c8e67ca95eb7db661838a76579f2e
github.comgithub.com/Dokploy/dokploy/releases/tag/v0.29.13
github.comgithub.com/Dokploy/dokploy/security/advisories/GHSA-478p-cx3j-hghc

Frequently asked

questions

It can be exploited through Dokploy's remote configuration workflow when an attacker can influence the relevant Traefik settings and the deployment can reach a managed server.

The attacker needs authorization or another path to modify affected configuration values. The resulting command executes with the permissions of Dokploy's configured SSH account.

Avoid invoking a shell with interpolated configuration data. Use structured remote execution, safely transferred files, strict validation, and least-privileged service accounts.

Treat all configuration values as untrusted, separate data from commands, review every shell boundary, and enforce static-analysis and CI policies against unsafe command construction.

Find out what's already
exploitable in your codebase.