/

CVE-2026-34038

Severity:

CRITICAL RISK

(9.9)

Command Injection (CWE-78) in Coolify Deployment Flows

CVE-2026-34038

Deferred

Vulnerability type

Category:

Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution and Credential Exposure

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

A command injection flaw in Coolify's deployment handling allows authenticated users with application write permissions to inject arbitrary shell commands via deployment-related fields.

When exploited during application deployment, this can lead to remote code execution on managed servers and exposure of sensitive environment variables through deployment logs.

Affected context

This vulnerability occurs in Coolify instances where application deployments are configured and triggered by users who hold write permissions on the affected application.

Risk is present when deployment parameters such as dockerfile_location and deployment command fields are passed to shell execution routines without robust sanitization, escaping, or contextual validation.

The issue is most relevant in environments where deployment pipelines run with access to sensitive environment variables, secrets, or privileged system resources.

Exploit preconditions

  • Attack surface: Application deployment workflows within the Coolify web interface or its associated APIs.
  • Required access: Authenticated access with application write permissions (ability to configure or modify deployment settings).
  • Trigger point: Execution of a deployment that uses user-controlled fields such as dockerfile_location or custom deployment commands.
  • Why exploitation is possible: User-supplied deployment parameters are incorporated into shell commands or scripts without strict validation, escaping, or contextual separation, enabling shell metacharacters and arbitrary command sequences to be executed.

Why this happens

The underlying bug class aligns with CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

In abstract terms, the deployment logic treats user-controllable configuration fields as trusted command fragments and concatenates or interpolates them into shell invocations.

Without systematic neutralization of special characters or use of safer execution primitives that separate data from commands, attackers can craft input that alters the intended command structure and introduces arbitrary operations.

This insecure pattern often arises when deployment tooling favors flexibility and direct shell control over strict parameterization and context-aware validation.

Potential impact

  • Remote code execution on the server or container running the deployment process.
  • Exfiltration of sensitive environment variables and secrets via deployment logs or command output.
  • Modification, deletion, or corruption of application data and configuration.
  • Pivoting to other services or infrastructure components reachable from the compromised deployment environment.
  • Installation of backdoors or persistent malicious tooling within managed servers or containers.

General mitigation guidance

Effective mitigation centers on reducing the trust placed in user-controlled deployment parameters and eliminating direct string-based command construction.

Recommended patterns include:

  • Using parameterized process execution APIs (e.g., exec-like calls that pass arguments as arrays) instead of shell command concatenation.
  • Strictly validating deployment-related inputs against whitelists, expected formats, and allowed paths, rejecting or normalizing anything outside defined bounds.
  • Avoiding dynamic inclusion of arbitrary user-specified command fragments; instead, expose higher-level deployment actions that map to predefined, vetted operations.
  • Minimizing privileges for deployment processes, including limiting access to sensitive environment variables and restricting filesystem and network capabilities.
  • Designing deployment logging to avoid automatically echoing high-sensitivity values or raw command output where unnecessary.

How teams detect issues like this

Detection typically involves a combination of code-level and operational controls:

  • Static analysis rules that flag string concatenation or interpolation into shell execution APIs when user-input or configuration fields are involved.
  • Code review checklists that specifically examine deployment and orchestration logic for command construction, shell usage, and unvalidated parameters.
  • Application security policies that constrain where and how shell commands may be invoked, enforcing use of safer process execution patterns.
  • Runtime monitoring and logging to detect anomalous deployment commands, unexpected environment variable access, or unusual process behavior during deployments.
  • Optional use of automated secure coding tools integrated into CI/CD to surface OS command injection patterns before they reach production.

Sources

SourceLink
github.comgithub.com/coollabsio/coolify/commit/23f9156c7306b221101f1ebbe4d3c6b5e2522acd
github.comgithub.com/coollabsio/coolify/pull/9007
github.comgithub.com/coollabsio/coolify/releases/tag/v4.0.0-beta.469
github.comgithub.com/coollabsio/coolify/security/advisories/GHSA-qqrq-r9h4-x6wp

Frequently asked

questions

Exploitability is limited to authenticated users who possess application write permissions, but within that scope it is highly impactful, enabling arbitrary command execution during deployments and potential data exfiltration.

The attacker must be able to log into Coolify and modify deployment-related configuration or commands for an application they can write to; no direct system-level access is required beyond the compromised application context.

The most robust fix is to remove direct shell command construction from user-controllable fields, instead using parameterized process execution and tightly constrained, validated deployment actions that treat user input purely as data.

Future prevention relies on enforcing secure design for deployment tooling: avoid shell concatenation with user input, adopt strict validation and whitelisting for configuration fields, apply least privilege to deployment processes, and integrate security-focused code reviews and automated checks into development and CI/CD workflows.

Find out what's already
exploitable in your codebase.