/

CVE-2026-129987

Severity:

CRITICAL RISK

(9.9)

Command Injection (CWE-77) in Dokploy DB Passwords

CVE-2026-129987

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-77

Impact:

Arbitrary OS 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

Dokploy's database password-change procedures pass attacker-controlled passwords into Bash command strings, where permitted backticks can trigger command substitution. An authenticated user who can update a database password may therefore execute operating-system commands with the privileges of the Dokploy process.

Affected context

The issue affects Dokploy's password-change procedures for MySQL, PostgreSQL, MariaDB, MongoDB, and Redis when password values are interpolated into Bash command strings. It becomes risky when an authenticated user can update a database password and the validation permits characters that the shell interprets as command syntax.

Exploit preconditions

  • Attack surface: Database password-change procedures in Dokploy
  • Required access: An authenticated account authorized to update a database password
  • Trigger point: The procedure constructs or runs a Bash command using the supplied password
  • Why exploitation is possible: Permitted backticks in the password can be interpreted by Bash as command substitution before the database command runs

Why this happens

The underlying issue is command injection (CWE-77): data supplied as a password is incorporated into a shell command in a way that allows shell syntax to be interpreted as code. Input validation that permits backticks does not make shell interpolation safe; the vulnerable pattern is treating untrusted data as part of a command string rather than as a separate argument.

Potential impact

  • An attacker with the required access may execute arbitrary operating-system commands
  • Commands could run with the privileges of the Dokploy process, which may be root
  • The host or service environment could be compromised
  • Data, credentials, or other services accessible to the process could be exposed or altered

General mitigation guidance

Common defensive patterns focus on keeping untrusted values out of shell command syntax:

  • Prefer direct library or database APIs, or invoke processes with argument arrays and without a shell.
  • Avoid constructing commands through string interpolation; apply context-appropriate encoding when unavoidable.
  • Treat password values as untrusted data and use validation as an additional safeguard, not as the primary defense against shell interpretation.
  • Run the Dokploy process with the least privileges needed and limit its access to sensitive files and services.

How teams detect issues like this

  • Use static analysis to identify shell execution APIs and command strings built through concatenation or interpolation.
  • Review password-change code paths for values flowing from user input into Bash commands, including cases where validation permits shell metacharacters.
  • Enforce code-review or CI policies that favor shell-free process invocation and flag unsafe command construction.
  • Monitor for unexpected child processes or command execution by the Dokploy service account.

Sources

SourceLink
github.comgithub.com/Dokploy/dokploy/commit/accc2ffbda3e698bad328cc6e9fe5837a7bafba6
github.comgithub.com/Dokploy/dokploy/pull/5910
github.comgithub.com/Dokploy/dokploy/releases/tag/v0.31.1
github.comgithub.com/Dokploy/dokploy/security/advisories/GHSA-9932-qg8x-pr32

Frequently asked

questions

An authenticated user who is authorized to update a database password can reach the affected procedures.

The described trigger is a password update through Dokploy; direct host access is not specified as a prerequisite. The attacker does need the relevant authenticated permission.

Avoid passing interpolated strings to a shell. Use direct APIs or invoke commands with separate arguments and no shell interpretation.

Keep untrusted input out of executable command strings, review data flows into process-launch APIs, and run services with least privilege.

Find out what's already
exploitable in your codebase.