/

CVE-2026-129986

Severity:

CRITICAL RISK

(9.9)

Command Injection (CWE-78) in Dokploy File Mount Deletion

CVE-2026-129986

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-77, CWE-78

Impact:

Arbitrary command execution in the host context

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 local file-mount deletion path passes a user-controlled path to a shell command without safely separating it from command syntax. An authenticated member with file-mount creation and deletion permissions may execute arbitrary commands in the host context when deleting a local mount, even if no container is running.

Affected context

The issue occurs in Dokploy's local file-mount deletion flow. The local removal helper interpolates the user-controlled file path into an unquoted rm -rf command; the remote branch handles the path differently by quoting it. Risk depends on a user being able to create and delete file mounts with a path that reaches this local command.

Exploit preconditions

  • Attack surface: Local file-mount deletion
  • Required access: An authenticated account with file-mount create and delete permissions
  • Trigger point: Deleting a local file mount
  • Why exploitation is possible: The user-controlled path is interpolated unquoted into a shell command, allowing shell syntax to be interpreted as commands
  • Runtime dependency: A running container is not required

Why this happens

The local removal helper constructs a shell command by inserting a user-controlled path without safely handling shell metacharacters or keeping the path separate from command syntax. This is OS command injection, mapped to CWE-78; more broadly, it is a command-injection weakness under CWE-77. Quoting the remote branch does not protect the vulnerable local branch.

Potential impact

  • An attacker may execute arbitrary commands in the host context
  • Host files or services could be modified or disrupted
  • Sensitive data could be accessed or altered
  • The host environment could be used for further compromise

General mitigation guidance

Mitigation patterns include avoiding shell interpretation when performing file operations and passing paths as discrete arguments to APIs that do not invoke a shell. Treat user-controlled paths as untrusted, apply canonicalization and boundary checks appropriate to the intended mount location, and enforce authorization for both creating and deleting mounts. Run services with the least privileges needed so that command execution, if it occurs, has a limited scope.

How teams detect issues like this

  • Use static analysis to identify shell-command construction that concatenates or interpolates user-controlled values.
  • Review file deletion helpers and compare how local and remote branches handle paths.
  • Check for process-execution calls that pass assembled command strings rather than argument arrays.
  • Enforce code-review or CI policies that prohibit unsafe shell invocation patterns and require validation of user-controlled filesystem paths.

Sources

SourceLink
github.comgithub.com/Dokploy/dokploy/commit/861a1fbfc9f847b706cae65c5312655a53eb8f7c
github.comgithub.com/Dokploy/dokploy/pull/5907
github.comgithub.com/Dokploy/dokploy/releases/tag/v0.31.1
github.comgithub.com/Dokploy/dokploy/security/advisories/GHSA-945r-hp2m-928m

Frequently asked

questions

The described path is the local file-mount deletion flow, where the path is passed unquoted to a shell command.

An authenticated member must have permission to create and delete file mounts. A running container is not required.

Avoid invoking a shell for file removal; use a filesystem API or pass a validated path as a discrete argument to a process API that does not interpret shell syntax.

Treat paths and other user-controlled values as untrusted, minimize shell use, apply authorization and path-boundary checks, and use static analysis and code review to catch unsafe command construction.

Find out what's already
exploitable in your codebase.