/

CVE-2026-45630

Severity:

CRITICAL RISK

(9.0)

OS Command Injection in Dokploy tRPC Traefik Configuration

CVE-2026-45630

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.0)

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 command injection flaw in Dokploy's application.updateTraefikConfig tRPC endpoint allows authenticated admin/owner users to inject arbitrary shell commands into the underlying operating system via unsanitized echo-based shell interpolation.

When this endpoint is used to update Traefik configuration, user-controlled data is concatenated directly into shell commands, enabling remote command execution on the Dokploy server or connected remote hosts.

Affected context

This vulnerability affects Dokploy instances (version 0.28.8 and earlier) where:

  • The application.updateTraefikConfig tRPC endpoint is enabled and reachable by authenticated users.
  • Traefik configuration updates are performed by spawning shell commands (e.g., with echo and shell interpolation) instead of using safe, parameterized operations.
  • Admin or owner-level users can influence values that are interpolated into command strings that run on the server or remote hosts.

The issue is most relevant in deployments where Dokploy orchestrates configuration changes on production infrastructure or remote servers via shell calls.

Exploit preconditions

  • Attack surface: Dokploy backend API, specifically the application.updateTraefikConfig tRPC endpoint.
  • Required access: Authenticated admin/owner account with permission to update Traefik configuration.
  • User-controlled input: Configuration parameters and fields that are passed into shell commands using string interpolation (e.g., via echo or similar constructs).
  • Trigger point: Invocation of the Traefik configuration update routine, which constructs and executes the shell command.
  • Why exploitation is possible: User-supplied values are concatenated directly into shell command strings without adequate sanitization, quoting, or use of non-shell-based APIs. The shell then interprets special characters (such as command separators, substitution operators, or redirection tokens), allowing execution of injected commands under the privileges of the Dokploy process or remote execution context.

Why this happens

The core issue is an OS command injection pattern (CWE-78) where the application builds shell command strings from user-influenced data and executes them via the system shell.

Instead of treating configuration values as opaque data, the code interpolates them into a command that is executed by /bin/sh (or equivalent) using constructs such as echo "user_input" > file or chained commands.

Because the input is not strictly validated, escaped, or treated as arguments to a safe process invocation API, the shell interprets metacharacters and executes attacker-supplied instructions.

This represents a structural design flaw: relying on generic shell commands and string composition for configuration management rather than using safe file I/O, templating, or programmatic configuration APIs.

Potential impact

  • Arbitrary command execution on the Dokploy server under the Dokploy service account.
  • Execution of commands on remote servers that Dokploy manages for Traefik configuration.
  • Reading, modifying, or deleting sensitive application or system data.
  • Deployment of backdoors, cryptocurrency miners, or other persistent malware.
  • Pivoting to other internal services and lateral movement within the infrastructure.
  • Full compromise of hosted applications and their configuration, including traffic routing rules.

General mitigation guidance

Effective mitigation typically centers on removing shell-based composition from configuration updates and treating configuration data as pure data:

  • Replace shell command construction with direct file I/O or API calls using language-native libraries rather than sh, bash, or equivalent.
  • If external processes must be invoked, use APIs that accept argument arrays (e.g., spawn/execFile/equivalents) and pass user input only as arguments, not as part of a command string.
  • Introduce strict validation and canonicalization for all configuration fields that influence command execution, accepting only well-formed, whitelisted values.
  • Apply robust quoting and escaping for any residual interaction with shells, ensuring that metacharacters are not interpreted as control operators.
  • Restrict the privileges of the Dokploy process and any remote execution accounts, limiting access to only what is necessary for Traefik management.
  • Segregate configuration execution contexts (e.g., using containers or isolated service accounts) so that a compromise has limited blast radius.

How teams detect issues like this

Organizations can approach detection using a combination of code-level and operational techniques:

  • Static analysis: Define rules to flag any concatenation of user-controlled strings into exec, execSync, spawn, system, or similar shell-invoking APIs. Pay special attention to uses of echo and redirection operators that incorporate runtime data.
  • Code review: During manual reviews, look for:
  • tRPC or API handlers that call shell commands.
  • Any command constructed with template literals, string concatenation, or interpolation of request parameters or configuration values.
  • Lack of centralized validation or sanitization around configuration update paths.
  • Policy enforcement: Introduce secure coding guidelines that prohibit shell-based configuration changes and require argument-based process invocation or library calls instead.
  • Runtime monitoring: Monitor logs for unusual command patterns initiated from Dokploy, including suspicious shell characters, unexpected network tools (e.g., curl, wget, nc), or atypical file modification operations originating from the Dokploy process.
  • Automated code review tools and CI-integrated scanners can help enforce these patterns by blocking changes that introduce new command construction from user input.

Sources

SourceLink
github.comgithub.com/Dokploy/dokploy/security/advisories/GHSA-p787-6gqg-cvp5

Frequently asked

questions

Yes, but only through authenticated access. An attacker who can authenticate as an admin or owner and reach the application.updateTraefikConfig endpoint can exploit the issue remotely via the Dokploy API.

The attacker must have valid admin/owner credentials or be able to compromise such an account. Anonymous or low-privilege users cannot directly trigger the vulnerable Traefik configuration update path under normal configurations.

The safest approach is to eliminate shell-based command construction entirely for Traefik configuration updates, instead using direct file-writing operations or Traefik-native APIs and treating all configuration input as data, not as part of a command string.

Adopt a development policy that forbids building shell commands from user input, enforce input validation and strict typing on all configuration endpoints, rely on parameterized process invocation or library calls, and integrate static analysis and security review into the CI/CD pipeline to detect new occurrences of command injection patterns.

Find out what's already
exploitable in your codebase.