/

CVE-2026-34153

Severity:

HIGH RISK

(8.8)

OS Command Injection (CWE-78) in Coolify Storage

CVE-2026-34153

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution by Authenticated User

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

An OS command injection flaw in Coolify's file storage handling allows authenticated users to influence shell commands via unvalidated path parameters.

When a user with permission to add file storage supplies crafted mount paths, Coolify builds shell commands with unescaped values, which can result in arbitrary command execution on the server.

Affected context

This vulnerability appears in Coolify deployments where authenticated users are allowed to add or manage file storage volumes.

The issue arises in logic that:

  • Constructs shell commands in LocalFileVolume::saveStorageOnServer using fs_path and parent_dir before validation or escaping
  • Accepts user-controlled file-mount paths via submitFileStorage without sufficient validation

It is most relevant in multi-user or shared-hosting environments where non-admin users can define storage locations or mounts.

Exploit preconditions

  • Attack surface: Web interface or API endpoints that allow adding or configuring file storage.
  • Required access: Valid authenticated account with permissions to create or modify file storage volumes.
  • Trigger point: Submission of a crafted storage configuration where fs_path, parent_dir, or file-mount path is processed and passed into shell commands.
  • Why exploitation is possible: User-controlled path values are concatenated into shell commands without proper sanitization or strict validation, enabling injection of additional command syntax interpreted by the underlying OS shell.

Why this happens

The underlying bug is a classic OS command injection (CWE-78) pattern.

Application logic constructs shell commands by interpolating user-controlled values such as file paths (fs_path, parent_dir, mount paths) into command strings before applying validation, escaping, or normalization.

Because these values can contain characters meaningful to the shell, the resulting command string can be altered to execute arbitrary commands.

The absence of strict input validation and the reliance on shell command construction rather than safer, parameterized APIs create an unsafe boundary between application input and operating system execution.

Potential impact

  • Authenticated users may be able to execute arbitrary OS commands on the Coolify host.
  • Attackers could read, modify, or delete files accessible to the Coolify process.
  • Compromise of other services or applications running on the same server.
  • Installation of backdoors or persistence mechanisms on the host system.
  • Lateral movement to connected infrastructure or data stores, depending on host privileges and network topology.

General mitigation guidance

Mitigation typically focuses on eliminating direct shell command construction and constraining how filesystem paths are handled:

  • Replace shell command construction with language-native filesystem, process, or container APIs that do not interpret shell metacharacters.
  • If shell execution is unavoidable, use safe process-spawning functions with argument arrays and avoid invoking a shell interpreter.
  • Enforce strict validation and normalization of path input, allowing only expected characters and directory structures (e.g., whitelisting directories, disallowing shell metacharacters).
  • Apply least-privilege principles for the Coolify process, limiting filesystem and OS capabilities so that command execution, if abused, has reduced impact.
  • Separate roles and restrict which authenticated users are allowed to configure or add storage volumes.

How teams detect issues like this

Organizations can detect and monitor for this class of issue using multiple approaches:

  • Static application security testing (SAST) rules to flag string-based shell command construction that includes user-supplied input.
  • Code review checklists that explicitly call out shell invocation sites and require validation/escaping of all parameters.
  • Runtime monitoring or intrusion detection on the host to watch for unusual command execution patterns originating from the Coolify process.
  • Logging and alerting around storage configuration changes and unexpected mount path values that contain suspicious characters.
  • Periodic security scans or automated review tools focused on command injection patterns in server management and orchestration software.

Sources

SourceLink
github.comgithub.com/coollabsio/coolify/commit/3fdce06b654fa3b7b4be59c0faaab6b4546c78de
github.comgithub.com/coollabsio/coolify/pull/9176
github.comgithub.com/coollabsio/coolify/security/advisories/GHSA-46hp-7m8g-7622

Frequently asked

questions

Yes, but only by authenticated users who can access the Coolify interface or API and have permission to configure file storage. It is not exploitable by unauthenticated visitors.

The attacker must possess a valid account with the capability to create or modify file storage volumes. They do not need direct shell access; the exploit is triggered via crafted configuration parameters.

The most robust fix is to avoid constructing shell commands from user input entirely and instead use safe, parameterized APIs for filesystem and system operations. Where shell use is unavoidable, ensure that user input is strictly validated, normalized, and passed as discrete arguments without invoking a shell interpreter.

Adopt a secure coding standard that prohibits direct shell command construction with user-controlled data, enforce input validation on all configuration parameters, and incorporate automated security testing and focused code reviews around command execution and path handling logic.

Find out what's already
exploitable in your codebase.