CVE-2025-34157

9.0 CRITICAL

📋 TL;DR

Coolify versions before v4.0.0-beta.420.6 contain a stored XSS vulnerability where authenticated users can inject malicious JavaScript into project names. When administrators interact with these projects, the payload executes in their browser context, potentially compromising the entire Coolify instance. This affects all Coolify deployments running vulnerable versions.

💻 Affected Systems

Products:
  • Coolify
Versions: All versions prior to v4.0.0-beta.420.6
Operating Systems: All platforms running Coolify
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated user access, but low-privilege users can exploit this vulnerability.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of Coolify instance including theft of administrator credentials, API tokens, session cookies, and unauthorized access to managed servers via WebSocket terminals, leading to full system takeover.

🟠

Likely Case

Attackers steal administrator credentials and API tokens, gaining persistent access to the Coolify instance and potentially compromising managed infrastructure.

🟢

If Mitigated

Limited impact with proper input validation and output encoding, potentially only affecting the specific administrator session.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

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

Exploitation requires authenticated user access but is straightforward once access is obtained. Public proof-of-concept exists in GitHub repository.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v4.0.0-beta.420.7

Vendor Advisory: https://github.com/coollabsio/coolify/releases/tag/v4.0.0-beta.420.7

Restart Required: Yes

Instructions:

1. Backup your Coolify instance and configuration. 2. Update to v4.0.0-beta.420.7 or later using the official upgrade process. 3. Restart the Coolify service. 4. Verify the update was successful.

🔧 Temporary Workarounds

Input Validation Filter

all

Implement server-side input validation to reject project names containing JavaScript or HTML tags

Not applicable - requires code modification

Output Encoding

all

Apply proper output encoding when displaying project names in web interface

Not applicable - requires code modification

🧯 If You Can't Patch

  • Restrict project creation to trusted administrators only
  • Implement web application firewall (WAF) rules to detect and block XSS payloads in project names

🔍 How to Verify

Check if Vulnerable:

Check Coolify version in admin panel or via API. If version is below v4.0.0-beta.420.6, the system is vulnerable.

Check Version:

Check Coolify admin dashboard or run: docker exec coolify cat /app/package.json | grep version

Verify Fix Applied:

After updating, verify version is v4.0.0-beta.420.7 or later and test project creation with suspicious names to ensure proper sanitization.

📡 Detection & Monitoring

Log Indicators:

  • Unusual project creation patterns
  • Project names containing JavaScript or HTML tags
  • Multiple failed deletion attempts

Network Indicators:

  • Unexpected outbound connections from Coolify instance
  • Suspicious WebSocket connections

SIEM Query:

source="coolify" AND (message="project created" OR message="project deleted") AND (name CONTAINS "<script>" OR name CONTAINS "javascript:")

🔗 References

📤 Share & Export