CVE-2025-66211

8.8 HIGH

📋 TL;DR

Coolify versions before 4.0.0-beta.451 contain an authenticated command injection vulnerability in PostgreSQL initialization script filename handling. Users with application/service management permissions can execute arbitrary commands as root on managed servers, leading to full remote code execution. This affects all Coolify deployments with vulnerable versions.

💻 Affected Systems

Products:
  • Coolify
Versions: All versions prior to 4.0.0-beta.451
Operating Systems: Linux
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated user with application/service management permissions. PostgreSQL service must be configured.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of managed servers with root-level access, allowing data theft, lateral movement, and persistent backdoor installation.

🟠

Likely Case

Privilege escalation leading to unauthorized access to sensitive data and disruption of managed services.

🟢

If Mitigated

Limited impact if proper network segmentation and least privilege access controls are implemented.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploit details available in public GitHub repository. Requires authenticated access but trivial to execute once authenticated.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 4.0.0-beta.451

Vendor Advisory: https://github.com/coollabsio/coolify/security/advisories/GHSA-24mp-fc9q-c884

Restart Required: Yes

Instructions:

1. Backup your Coolify configuration and data. 2. Update to version 4.0.0-beta.451 or later using the official update mechanism. 3. Restart the Coolify service. 4. Verify the update was successful.

🔧 Temporary Workarounds

Restrict User Permissions

all

Temporarily remove application/service management permissions from non-essential users

Network Segmentation

all

Isolate Coolify management interface from production servers

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate Coolify from critical infrastructure
  • Apply principle of least privilege - remove application/service management permissions from all non-essential users

🔍 How to Verify

Check if Vulnerable:

Check Coolify version via web interface or configuration files. If version is below 4.0.0-beta.451, system is vulnerable.

Check Version:

Check Coolify web interface dashboard or configuration files for version information

Verify Fix Applied:

Verify version is 4.0.0-beta.451 or higher and test PostgreSQL initialization script functionality.

📡 Detection & Monitoring

Log Indicators:

  • Unusual shell commands executed by Coolify process
  • Unexpected PostgreSQL initialization activities
  • Root-level command execution from Coolify user

Network Indicators:

  • Unusual outbound connections from Coolify server
  • SSH/RDP connections originating from Coolify to managed servers

SIEM Query:

process_name:"coolify" AND (command_line:*sh* OR command_line:*bash* OR command_line:*root*)

🔗 References

📤 Share & Export