CVE-2025-59158

8.0 HIGH

📋 TL;DR

This stored XSS vulnerability in Coolify allows authenticated low-privilege users to inject malicious JavaScript into project names. When administrators interact with these projects, the script executes in their browser context, potentially compromising administrative accounts. All Coolify instances running vulnerable versions are affected.

💻 Affected Systems

Products:
  • Coolify
Versions: All versions prior to and including v4.0.0-beta.420.6
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated user with at least member role privileges.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Administrator account takeover leading to full system compromise, data exfiltration, or deployment of malicious resources across the infrastructure.

🟠

Likely Case

Session hijacking of administrator accounts, unauthorized actions performed with admin privileges, or credential theft.

🟢

If Mitigated

Limited impact due to proper input validation and output encoding preventing script execution.

🌐 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 once authenticated.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v4.0.0-beta.420.7

Vendor Advisory: https://github.com/coollabsio/coolify/security/advisories/GHSA-h52r-jxv9-9vhf

Restart Required: Yes

Instructions:

1. Backup your Coolify configuration and data. 2. Update to v4.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

Input Validation Filter

all

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

Output Encoding

all

Apply proper output encoding to project names when rendered in web interfaces.

🧯 If You Can't Patch

  • Restrict project creation to trusted users only by modifying role permissions.
  • Implement a web application firewall (WAF) with XSS protection rules.

🔍 How to Verify

Check if Vulnerable:

Check if your Coolify version is 4.0.0-beta.420.6 or earlier in the admin interface or via version command.

Check Version:

docker exec coolify cat /app/version.txt || check admin dashboard

Verify Fix Applied:

After updating, confirm version is 4.0.0-beta.420.7 or later and test project creation with malicious names.

📡 Detection & Monitoring

Log Indicators:

  • Unusual project creation events with special characters
  • Administrative actions following suspicious project interactions

Network Indicators:

  • HTTP requests with JavaScript payloads in project name parameters

SIEM Query:

source="coolify" AND (event="project_create" AND name MATCHES "<script>.*</script>")

🔗 References

📤 Share & Export