CVE-2025-59156 Overview
CVE-2025-59156 is a Remote Code Execution (RCE) vulnerability affecting Coolify, an open-source and self-hostable tool for managing servers, applications, and databases. This flaw exists in Coolify's application deployment workflow, allowing a low-privileged member to inject arbitrary Docker Compose directives during project creation or updates. By defining a malicious service that mounts the host filesystem, an attacker can achieve root-level command execution on the host OS, completely bypassing container isolation.
Critical Impact
This vulnerability enables complete host system compromise through container escape, allowing attackers with low-privilege access to execute arbitrary commands as root on the underlying host operating system.
Affected Products
- Coolify versions prior to 4.0.0-beta.420.7
Discovery Timeline
- 2026-01-05 - CVE CVE-2025-59156 published to NVD
- 2026-01-08 - Last updated in NVD database
Technical Details for CVE-2025-59156
Vulnerability Analysis
This vulnerability is classified as CWE-78 (Improper Neutralization of Special Elements used in an OS Command, commonly known as OS Command Injection). The flaw resides in Coolify's handling of Docker Compose configurations during the application deployment workflow.
The vulnerability allows authenticated users with low privileges to inject malicious Docker Compose directives when creating or updating projects. The application fails to properly validate and sanitize user-controlled input that gets incorporated into Docker Compose configurations, enabling attackers to define arbitrary service configurations.
The most severe exploitation path involves mounting sensitive host directories (such as / or /etc) into a malicious container, effectively breaking out of container isolation. Once the host filesystem is accessible within the attacker-controlled container, arbitrary commands can be executed with root privileges on the host system.
Root Cause
The root cause is insufficient input validation in the Docker Compose configuration handling mechanism. Coolify fails to restrict or sanitize Docker Compose directives that users can specify during project creation or updates. This allows attackers to inject dangerous configuration options such as volume mounts that expose the host filesystem, privileged container settings, or other security-sensitive Docker parameters that should be restricted.
Attack Vector
The attack can be executed remotely over the network by any authenticated user with member-level privileges in a Coolify instance. The exploitation process involves:
- Authenticating to the Coolify application with a low-privileged member account
- Creating or updating a project with a malicious Docker Compose configuration
- Injecting a service definition that mounts the host filesystem (e.g., mounting / to a container path)
- Executing commands within the container that operate on the mounted host filesystem
- Achieving persistent root access to the host operating system
The vulnerability does not require any user interaction beyond the attacker's own actions, and the attack complexity is low since it only requires basic authentication and knowledge of Docker Compose syntax. For detailed technical information, see the GitHub Security Advisory.
Detection Methods for CVE-2025-59156
Indicators of Compromise
- Unexpected Docker containers with host filesystem mounts (volumes containing :/ or sensitive paths like /etc, /root, /var)
- Unusual project configurations containing privileged Docker Compose directives
- New or modified cron jobs, SSH keys, or system services on the host that were not administratively created
- Container processes executing commands that interact with mounted host directories
Detection Strategies
- Monitor Docker daemon logs for container creations with suspicious volume mount configurations
- Implement audit logging for all project creation and update operations within Coolify
- Scan Docker Compose configurations for dangerous directives such as host filesystem mounts, privileged mode, or capability additions
- Review Coolify application logs for unusual project modification patterns by low-privileged users
Monitoring Recommendations
- Enable comprehensive audit logging for all Coolify administrative and deployment operations
- Configure alerts for Docker containers started with host path volume mounts
- Monitor for unexpected changes to host system files, particularly in /etc/crontab, /etc/passwd, /root/.ssh/authorized_keys
- Implement network segmentation and monitoring for anomalous traffic from Coolify-managed hosts
How to Mitigate CVE-2025-59156
Immediate Actions Required
- Upgrade Coolify to version 4.0.0-beta.420.7 or later immediately
- Audit all existing project configurations for malicious Docker Compose directives
- Review user access and privileges within Coolify, applying least privilege principles
- Inspect host systems managed by Coolify for signs of compromise
Patch Information
The vulnerability has been addressed in Coolify version 4.0.0-beta.420.7. This patch implements proper validation and sanitization of Docker Compose configurations to prevent injection of dangerous directives. Administrators should update their Coolify installations immediately by following the standard upgrade procedure. Additional details are available in the GitHub Security Advisory.
Workarounds
- Restrict Coolify access to only trusted administrators until the patch can be applied
- Implement additional network-level access controls to limit who can reach the Coolify management interface
- Review and remove unnecessary member accounts that could be used to exploit this vulnerability
- Consider disabling project creation/update capabilities for non-administrator users through reverse proxy or application firewall rules
# Audit existing Docker containers for suspicious volume mounts
docker ps -a --format '{{.Names}}' | xargs -I {} docker inspect {} --format '{{.Name}}: {{range .Mounts}}{{.Source}} -> {{.Destination}} {{end}}'
# Check for containers with host root filesystem mounted
docker inspect $(docker ps -q) --format '{{.Name}}: {{range .Mounts}}{{if eq .Source "/"}}HOST ROOT MOUNTED{{end}}{{end}}' | grep "HOST ROOT"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


