/

CVE-2026-129989

Severity:

CRITICAL RISK

(9.9)

OS Command Injection (CWE-78) in Dokploy Nixpacks Build

CVE-2026-129989

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Arbitrary command execution on the Dokploy host

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

Before version 0.31.1, Dokploy's Nixpacks publishDirectory build setting could pass shell metacharacters into a command executed through child_process.exec. An authenticated user with access to an application could trigger a deployment that runs arbitrary commands on the Dokploy host, potentially compromising the host through its privileged Docker environment.

Affected context

The issue affects Dokploy deployments that use the Nixpacks build process and construct a docker cp command using the publishDirectory setting. It becomes risky when an authenticated user can influence that setting and a deployment executes the resulting shell command.

Exploit preconditions

  • Attack surface: Nixpacks application deployment
  • Required access: Authenticated access to an application with the ability to influence its build settings and trigger deployment
  • Trigger point: Execution of the docker cp command during a Nixpacks deployment
  • Why exploitation is possible: Shell metacharacters in publishDirectory are interpolated into a command executed through child_process.exec, allowing shell interpretation

Why this happens

The underlying issue is OS command injection, mapped to CWE-78. Building a shell command by interpolating a user-influenced setting allows shell syntax in that value to be interpreted as part of the command rather than as data. The command runs in a privileged Docker environment, increasing the potential consequences.

Potential impact

  • An attacker could execute arbitrary commands on the Dokploy host.
  • The host and its deployment environment may be compromised.
  • Access to the privileged Docker environment could enable further impact on workloads or data.

General mitigation guidance

Defensive patterns focus on avoiding shell interpretation and limiting the trust placed in build settings:

  • Prefer process APIs that pass executable arguments as an array rather than constructing shell command strings.
  • Treat build configuration as untrusted; validate values against a narrow, appropriate format.
  • Avoid accepting arbitrary paths where a constrained set of directories or identifiers will suffice.
  • Run deployment and Docker-related processes with the least privilege and access necessary.
  • Apply isolation and policy controls so that compromise of a build process does not grant broad host access.

How teams detect issues like this

  • Use static analysis to identify shell-execution APIs such as child_process.exec and trace whether user-controlled values reach command strings.
  • Review code for string interpolation in commands, especially for build settings and file paths.
  • Enforce code-review or CI policies that prefer argument-based process APIs and require validation of configuration values.
  • Monitor deployment activity and host processes for unexpected command execution associated with Nixpacks builds.

Sources

SourceLink
github.comgithub.com/Dokploy/dokploy/commit/2cd86b2447daba8fefec1272718d40463e18d6a3
github.comgithub.com/Dokploy/dokploy/pull/5911
github.comgithub.com/Dokploy/dokploy/releases/tag/v0.31.1
github.comgithub.com/Dokploy/dokploy/security/advisories/GHSA-98j8-6vjr-c3xw

Frequently asked

questions

An authenticated user with access to an application may be able to exploit it if they can influence the Nixpacks publishDirectory setting and trigger a deployment.

The described path requires access to Dokploy application functionality; it is not an unauthenticated attack path.

Avoid passing constructed command strings through a shell. Use argument-based process execution and validate configuration values against a strict format.

Treat build settings as untrusted input, constrain accepted paths and values, review command construction, and limit the privileges available to build and deployment processes.

Find out what's already
exploitable in your codebase.