/

CVE-2026-72869

Severity:

CRITICAL RISK

(9.9)

OS Command Injection (CWE-78) in Dokploy Restore Flow

CVE-2026-72869

Received

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-77, CWE-78

Impact:

Host-Level 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 an operating system command injection vulnerability in its backup restoration workflow, where a user-controlled database name is embedded in shell commands. An authenticated user with backup restore permission may trigger arbitrary command execution in the Docker-privileged host context when a crafted value is processed.

Affected context

The vulnerability occurs in Dokploy deployments using the backup restoration feature before version 0.29.13. The affected workflow passes the databaseName parameter through restore builders for PostgreSQL, MariaDB, MySQL, and MongoDB, where nested shell commands are executed through Node.js. Risk depends on an authenticated account having permission to restore backups and on the restoration process running with access to a Docker-privileged context.

Exploit preconditions

  • Attack surface: Authenticated backup restoration functionality exposed through the tRPC subscription
  • Required access: An account with the backup:restore permission
  • Trigger point: Processing a supplied databaseName during backup restoration
  • Execution context: Node.js invokes shell text that is subsequently used with docker exec
  • Why exploitation is possible: The database name is incorporated into nested shell commands without sufficiently separating data from executable shell syntax

Why this happens

The underlying flaw is command construction from untrusted input. The databaseName value is passed into restore commands for multiple database engines and becomes part of shell text executed by Node.js. Shell metacharacters or substitutions in that value can be interpreted by /bin/sh before the intended database operation runs. This maps primarily to CWE-78: Improper Neutralization of Special Elements used in an OS Command, with CWE-77: Improper Neutralization of Special Elements in Command describing the broader command-injection class.

Potential impact

  • An attacker may execute arbitrary commands on the host
  • The attacker could access or alter application and backup data
  • Docker control may enable container manipulation or lateral movement
  • Host credentials, secrets, or mounted resources could be exposed
  • Persistent compromise or service disruption may result

General mitigation guidance

Mitigation generally focuses on preventing user-controlled values from becoming shell syntax and reducing the privileges available to restoration workers.

Common defensive patterns include:

  • Avoiding shell interpretation for database and container operations
  • Using structured process-spawn APIs with argument arrays instead of shell command strings
  • Applying strict allowlists for database names and other identifiers
  • Treating authentication and authorization as separate from input validation
  • Removing unnecessary Docker socket, host filesystem, and elevated runtime access
  • Running restore jobs with least-privilege identities and isolated service accounts
  • Separating backup metadata from executable command construction

How teams detect issues like this

Organizations can look for:

  • Static analysis findings involving shell execution APIs, command concatenation, template interpolation, or shell-enabled process creation
  • Code review signals where request parameters or database identifiers flow into exec, sh -c, container commands, or restoration utilities
  • Policy checks that prohibit dynamic shell strings when structured argument APIs are available
  • Runtime monitoring for unexpected child processes, shell launches, Docker control operations, or commands originating from restore workers
  • Authorization and audit logs showing unusual backup restoration activity or repeated malformed database identifiers

Automated code review and software composition tools may help identify command-construction patterns, but runtime controls remain important for privileged deployment components.

Sources

SourceLink
github.comgithub.com/Dokploy/dokploy/commit/ccd2e83c57d99f725220d37e0152270e0827d71b
github.comgithub.com/Dokploy/dokploy/pull/4862
github.comgithub.com/Dokploy/dokploy/releases/tag/v0.29.13
github.comgithub.com/Dokploy/dokploy/security/advisories/GHSA-f7mp-9jfp-mjrr

Frequently asked

questions

It can be triggered through Dokploy's authenticated backup restoration interface when that interface is reachable and the attacker has the required permission. It is not an unauthenticated attack by default.

The attacker needs an authenticated account granted the backup:restore permission, along with access to invoke the affected restoration workflow.

The safest pattern is to keep user-controlled values out of shell syntax entirely. Structured process APIs, strict identifier validation, and non-privileged isolated restore workers reduce both injection risk and blast radius.

Treat all request parameters as untrusted, prohibit string-built shell commands in code review and CI policies, log privileged restoration actions, and minimize Docker and host-level privileges for application components.

Find out what's already
exploitable in your codebase.