/

CVE-2026-34168

Severity:

HIGH RISK

(8.8)

Command Injection (CWE-78) in Coolify Volume Removal

CVE-2026-34168

Deferred

Vulnerability type

Category:

Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution on Managed Servers

Severity:

HIGH RISK

(8.8)

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

Coolify contains a command injection vulnerability where the LocalPersistentVolume.name field is interpolated directly into docker volume shell commands without proper escaping.

An authenticated user who can define or modify storage names may inject shell metacharacters, leading to arbitrary command execution on managed servers when the associated resource is deleted.

Affected context

This vulnerability occurs in Coolify deployments where:

  • Users can create or manage LocalPersistentVolume resources
  • Docker volume operations are executed via shell commands on managed servers
  • The volume name is passed directly into shell command strings without argument escaping

It most directly affects environments where multiple users share the same Coolify instance and have access to define or modify storage-related configurations.

Exploit preconditions

  • Attack surface: Coolify web interface or API endpoints that allow creating or updating LocalPersistentVolume entries
  • Required access: Authenticated access with permissions to define storage names or manage volumes
  • Trigger point: Execution of docker volume shell commands during lifecycle events, particularly when a resource (and its associated volume) is deleted
  • Why exploitation is possible: The LocalPersistentVolume.name field is concatenated into a shell command without quoting or escaping, allowing shell metacharacters and additional commands to be interpreted by the shell

Why this happens

The root cause is direct interpolation of user-controlled data into shell command strings without appropriate escaping or use of safer invocation mechanisms.

This aligns with CWE-78: OS Command Injection, where untrusted input is used to construct operating system commands that are then executed by a shell.

Instead of treating the volume name as a single opaque argument, the code allows it to influence the structure of the command line, enabling attackers to inject additional shell syntax and execute arbitrary commands.

Potential impact

  • Authenticated users could execute arbitrary commands on managed servers
  • Compromise of the Coolify-managed host environment, including potential full system takeover
  • Unauthorized access to application data, databases, and secrets stored on the affected servers
  • Lateral movement to other services or infrastructure reachable from the compromised host
  • Disruption of hosted applications through data deletion, modification, or service interruption

General mitigation guidance

Effective mitigation focuses on isolating user input from shell interpretation and reducing trust in configuration fields:

  • Use safe process invocation APIs that pass arguments as arrays and avoid invoking a shell
  • Apply strict validation on storage names, limiting them to a predictable character set and length
  • Introduce centralized helpers for executing system commands that always handle quoting and escaping
  • Run management processes with least-privilege accounts and constrained permissions on the host
  • Consider separating control-plane services from data-plane hosts to limit blast radius if command execution occurs

How teams detect issues like this

Detection can leverage both code-centric and operational approaches:

  • Static analysis rules that flag direct string concatenation of user-controlled fields into shell commands
  • Code review guidelines that require use of parameterized command execution utilities rather than ad-hoc shell strings
  • Logging and monitoring of administrative actions, especially volume creation and deletion events, for anomalous volume names
  • Host-level monitoring for unusual shell invocations originating from the Coolify process, including commands with unexpected arguments or metacharacters

Automated security scanning tools and CI checks can help identify similar patterns of unescaped shell command construction across the codebase.

Sources

SourceLink
github.comgithub.com/coollabsio/coolify/commit/d2064dd4998694cda2eabd00149f7c4d1e94c699
github.comgithub.com/coollabsio/coolify/releases/tag/v4.0.0-beta.471
github.comgithub.com/coollabsio/coolify/security/advisories/GHSA-mh8x-fppq-cp77

Frequently asked

questions

It can be, if the Coolify instance is exposed over the network and reachable by authenticated users who can manage storage resources. The attack is carried out via the application interface but results in commands running on the managed servers.

The attacker needs authenticated access with permissions to create or modify LocalPersistentVolume resources or any feature that controls the storage name field used in docker volume operations.

The safest approach is to avoid shell-based command construction entirely and instead use APIs that pass arguments as structured parameters. If a shell must be used, all user-controlled fields should be strictly validated and safely quoted or escaped before execution.

Establish coding standards that prohibit direct interpolation of untrusted data into shell commands, enforce input validation on all configuration fields, and integrate security-focused code review and static analysis checks to catch command injection patterns early in development.

Find out what's already
exploitable in your codebase.