CVE-2025-66209

9.9 CRITICAL

📋 TL;DR

CVE-2025-66209 is an authenticated command injection vulnerability in Coolify's Database Backup functionality. It allows users with application/service management permissions to execute arbitrary commands as root on managed servers by injecting malicious database names. This affects all Coolify instances running versions prior to 4.0.0-beta.451.

💻 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. Affects all managed servers where database backups are configured.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full root compromise of all managed servers, allowing complete system takeover, data exfiltration, lateral movement, and persistent backdoor installation.

🟠

Likely Case

Privileged authenticated users can execute arbitrary commands on managed servers, potentially compromising databases, stealing credentials, and disrupting services.

🟢

If Mitigated

With proper access controls and network segmentation, impact is limited to specific managed servers, but root access still enables significant damage within those systems.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

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

Exploit requires authenticated access but is straightforward once credentials are obtained. Public proof-of-concept exists in GitHub repository.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 4.0.0-beta.451

Vendor Advisory: https://github.com/coollabsio/coolify/security/advisories/GHSA-vm5p-43qh-7pmq

Restart Required: Yes

Instructions:

1. Backup your Coolify configuration and data. 2. Update to version 4.0.0-beta.451 or later using: docker pull coollabsio/coolify:latest. 3. Restart the Coolify container. 4. Verify the update completed successfully.

🔧 Temporary Workarounds

Disable Database Backup Functionality

linux

Temporarily disable database backup features to prevent exploitation while planning upgrade.

Modify Coolify configuration to remove database backup schedules and disable backup UI elements

Restrict User Permissions

all

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

Review and modify user roles in Coolify admin interface to limit permissions

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate Coolify instances from critical infrastructure
  • Enforce multi-factor authentication and audit all user accounts with elevated permissions

🔍 How to Verify

Check if Vulnerable:

Check Coolify version in admin interface or run: docker inspect coolify | grep -i version

Check Version:

docker inspect coolify | grep -i version

Verify Fix Applied:

Confirm version is 4.0.0-beta.451 or later and test database backup functionality with safe inputs

📡 Detection & Monitoring

Log Indicators:

  • Unusual database backup operations with suspicious characters in database names
  • Shell command execution from Coolify process with unexpected arguments

Network Indicators:

  • Outbound connections from Coolify server to unexpected destinations following backup operations

SIEM Query:

source="coolify" AND (command="*;*" OR command="*|*" OR command="*`*" OR command="*$(*")

🔗 References

📤 Share & Export