CVE-2025-59156

8.8 HIGH

📋 TL;DR

This vulnerability allows low-privileged users in Coolify to inject malicious Docker Compose directives during project creation or updates. By mounting the host filesystem through a crafted service, attackers can execute arbitrary commands with root privileges on the host operating system, bypassing container isolation. All Coolify instances running vulnerable versions are affected.

💻 Affected Systems

Products:
  • Coolify
Versions: All versions prior to 4.0.0-beta.420.7
Operating Systems: All platforms running Docker
Default Config Vulnerable: ⚠️ Yes
Notes: Requires user authentication but only low-privileged member access is sufficient for exploitation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete host compromise with root-level access, allowing data theft, lateral movement, persistence establishment, and potential compromise of other containers or systems on the network.

🟠

Likely Case

Unauthorized access to host system, data exfiltration, deployment of malicious containers, and potential cryptocurrency mining or ransomware deployment.

🟢

If Mitigated

Limited impact if proper network segmentation, least privilege access, and monitoring are in place, though host compromise risk remains.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated access but is straightforward for attackers with basic Docker knowledge.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 4.0.0-beta.420.7

Vendor Advisory: https://github.com/coollabsio/coolify/security/advisories/GHSA-h5xw-7xvp-xrxr

Restart Required: Yes

Instructions:

1. Backup your Coolify configuration and data. 2. Update Coolify to version 4.0.0-beta.420.7 or later using your deployment method (Docker, manual, etc.). 3. Restart the Coolify service. 4. Verify the update was successful.

🔧 Temporary Workarounds

Restrict User Permissions

all

Temporarily remove project creation/update permissions from low-privileged users until patching is complete.

Docker Socket Protection

linux

Restrict access to Docker socket and implement Docker security best practices.

sudo chmod 660 /var/run/docker.sock
sudo chown root:docker /var/run/docker.sock

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate Coolify instances from critical systems
  • Enable comprehensive logging and monitoring for suspicious Docker Compose activities

🔍 How to Verify

Check if Vulnerable:

Check Coolify version in web interface or via API. If version is below 4.0.0-beta.420.7, the system is vulnerable.

Check Version:

docker exec coolify cat /app/package.json | grep version

Verify Fix Applied:

Confirm version is 4.0.0-beta.420.7 or higher and test that Docker Compose directive injection is no longer possible.

📡 Detection & Monitoring

Log Indicators:

  • Unusual Docker Compose configurations with host mounts
  • Suspicious service definitions in project creation logs
  • Unexpected container creations with privileged options

Network Indicators:

  • Unexpected outbound connections from Coolify host
  • Traffic to known malicious IPs or domains

SIEM Query:

source="coolify" AND ("docker-compose" OR "volume" OR "mount") AND ("host" OR "/" OR "privileged")

🔗 References

📤 Share & Export