/

CVE-2026-42143

Severity:

HIGH RISK

(8.8)

Shell Command Injection (CWE-78) in Coolify Volumes

CVE-2026-42143

Deferred

Vulnerability type

Category:

Command Injection

CWE:

CWE-78

Impact:

Root-level Remote Command 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 improperly interpolates user-controlled persistent volume names into shell commands executed on managed servers without escaping or validation.

An authenticated member can inject shell metacharacters into volume names and trigger command execution as root when volume operations run, making deployments and server management workflows risky.

Affected context

This vulnerability occurs in Coolify's server and application management workflows where persistent volumes are created, modified, or removed via the web interface.

Deployments are affected when:

  • Volume names are taken from user input
  • These names are embedded directly into shell commands on managed servers
  • The commands are executed with elevated privileges, often as root

It is most relevant in multi-user environments where members have access to configure storage or deployment settings.

Exploit preconditions

  • Attack surface: Coolify web interface and API endpoints that manage persistent volumes
  • Required access: Authenticated member access with permission to create or manage volumes
  • Trigger point: Execution of server-side shell commands that include the volume name (e.g., volume create/delete/attach operations)
  • Why exploitation is possible: User-controlled volume names are concatenated into shell command strings without quoting or validation, allowing shell metacharacters and command sequences to be executed with root privileges on the managed server.

Why this happens

The underlying issue is a classic command injection pattern where untrusted input is directly embedded in shell command lines.

Instead of treating the volume name as data and safely passing it as a parameter, Coolify constructs commands using string interpolation, leaving the shell to interpret special characters such as ;, &&, |, or $().

This aligns with CWE-78: Improper Neutralization of Special Elements used in an OS Command, where failure to escape or validate input allows attackers to alter the intended command and execute arbitrary operations.

Potential impact

  • An attacker may execute arbitrary commands as root on managed servers.
  • An attacker could install malware or backdoors on affected infrastructure.
  • An attacker may read, modify, or delete application and database data hosted on those servers.
  • An attacker could disrupt deployments and system availability by corrupting volumes or system files.
  • An attacker may pivot to other services or networks reachable from the compromised server.

General mitigation guidance

Effective mitigation focuses on treating user input as data, not part of a command line.

Common defensive patterns include:

  • Avoiding shell-based command construction and using OS APIs or libraries that accept structured arguments.
  • When shell commands are unavoidable, strictly validating volume names against an allow-list of safe characters and formats.
  • Properly quoting and escaping arguments so that the shell interprets them only as literals, not control characters.
  • Running server-side operations with least-privilege accounts and minimizing root-level execution.
  • Segregating management interfaces and limiting which roles can define or modify volume-related settings.

How teams detect issues like this

Organizations can identify similar vulnerabilities by:

  • Using static analysis rules to flag string concatenation or interpolation when building shell commands with user-supplied values.
  • Reviewing code for calls to exec, system, or shell wrappers that accept unvalidated parameters from HTTP requests or configuration fields.
  • Implementing secure coding guidelines that prohibit direct shell invocation for routine management tasks and require parameterized execution.
  • Employing automated security testing (e.g., dynamic analysis or fuzzing) to send crafted volume names and detect unexpected command behavior on test systems.

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-6pmw-6m96-4v4m

Frequently asked

questions

Exploitation is limited to environments where users have authenticated member access to Coolify and can configure or manage volumes. In such cases, the impact is high because commands execute with root privileges on managed servers.

The attacker must be an authenticated member with the ability to create or modify persistent volumes or trigger related operations. No direct shell access is required; exploitation occurs through crafted volume names.

The safest approach is to eliminate shell-based command construction for volume operations and use APIs or libraries that accept structured parameters. If shell use is unavoidable, strictly validate volume names and pass them as properly quoted, escaped arguments rather than embedding them in raw command strings.

Adopt secure coding practices that treat all user-controlled configuration values as untrusted, avoid building shell commands with concatenated input, enforce rigorous input validation and escaping, and include checks for command injection patterns in code review and automated security tooling.

Find out what's already
exploitable in your codebase.