CVE-2025-34157
CVE-2025-34157
CVSS Vector
v4.0- Attack Vector
- Network
- Attack Complexity
- Low
- Attack Requirements
- None
- Privileges Required
- Low
- User Interaction
- Passive
- Confidentiality (Vulnerable)
- High
- Integrity (Vulnerable)
- High
- Availability (Vulnerable)
- High
- Confidentiality (Subsequent)
- High
- Integrity (Subsequent)
- High
- Availability (Subsequent)
- High
Description
Coolify versions prior to v4.0.0-beta.420.6 are vulnerable to a stored cross-site scripting (XSS) attack in the project creation workflow. An authenticated user with low privileges can create a project with a maliciously crafted name containing embedded JavaScript. When an administrator attempts to delete the project or its associated resource, the payload executes in the admin’s browser context. This results in full compromise of the Coolify instance, including theft of API tokens, session cookies, and access to WebSocket-based terminal sessions on managed servers.
Comprehensive Technical Analysis of CVE-2025-34157
1. Vulnerability Assessment and Severity Evaluation
CVE ID: CVE-2025-34157 CVSS Score: 9
The vulnerability in Coolify versions prior to v4.0.0-beta.420.6 involves a stored cross-site scripting (XSS) attack in the project creation workflow. This vulnerability allows an authenticated user with low privileges to inject malicious JavaScript into a project name. When an administrator interacts with this project, the script executes in the admin’s browser context, leading to a full compromise of the Coolify instance.
Severity Evaluation:
- CVSS Score: 9 (Critical)
- Impact: Full compromise of the Coolify instance, including theft of API tokens, session cookies, and access to WebSocket-based terminal sessions on managed servers.
- Exploitability: High, as it requires only low-privilege access to exploit.
2. Potential Attack Vectors and Exploitation Methods
Attack Vectors:
- Authenticated User with Low Privileges: An attacker with minimal access can create a project with a maliciously crafted name.
- Administrator Interaction: The payload executes when an administrator attempts to delete the project or its associated resources.
Exploitation Methods:
- Stored XSS: The attacker embeds JavaScript code within the project name.
- Browser Context Execution: The malicious script runs in the admin’s browser context, allowing for session hijacking, API token theft, and unauthorized access to WebSocket-based terminal sessions.
3. Affected Systems and Software Versions
Affected Software:
- Coolify versions prior to v4.0.0-beta.420.6
Affected Systems:
- Any system running the vulnerable versions of Coolify, including cloud-based deployments and on-premises installations.
4. Recommended Mitigation Strategies
Immediate Actions:
- Upgrade to the Latest Version: Upgrade Coolify to version v4.0.0-beta.420.7 or later, which includes the patch for this vulnerability.
- Input Validation: Implement strict input validation and sanitization for project names and other user-generated content.
- Content Security Policy (CSP): Enforce a robust CSP to mitigate the impact of XSS attacks.
- Regular Audits: Conduct regular security audits and code reviews to identify and fix similar vulnerabilities.
Long-Term Strategies:
- Security Training: Educate developers and administrators on secure coding practices and the risks associated with XSS attacks.
- Automated Testing: Integrate automated security testing tools into the development pipeline to detect vulnerabilities early.
- Monitoring and Logging: Implement comprehensive monitoring and logging to detect and respond to suspicious activities promptly.
5. Impact on Cybersecurity Landscape
Immediate Impact:
- Compromise of Coolify Instances: Organizations using vulnerable versions of Coolify are at risk of full compromise, leading to data breaches and unauthorized access.
- Reputation Damage: Organizations may suffer reputational damage if their Coolify instances are compromised.
Long-Term Impact:
- Increased Awareness: This vulnerability highlights the importance of input validation and the risks associated with XSS attacks, potentially leading to improved security practices across the industry.
- Regulatory Compliance: Organizations may face regulatory scrutiny and penalties if they fail to address this vulnerability promptly.
6. Technical Details for Security Professionals
Vulnerability Details:
- Type: Stored XSS
- Location: Project creation workflow
- Trigger: Admin interaction with the maliciously named project
Exploitation Steps:
- Craft Malicious Payload: Create a project with a name containing embedded JavaScript.
- Admin Interaction: Wait for an administrator to delete the project or its associated resources.
- Payload Execution: The JavaScript payload executes in the admin’s browser context, leading to full compromise.
Detection and Response:
- Log Analysis: Review logs for unusual activities, such as unexpected project creation or deletion.
- Behavioral Analysis: Monitor for anomalous behavior indicative of session hijacking or unauthorized access.
- Incident Response: Follow established incident response procedures to contain and remediate the compromise.
Conclusion: CVE-2025-34157 represents a critical vulnerability in Coolify that can lead to full compromise of the instance. Organizations must prioritize upgrading to the patched version and implementing robust security measures to mitigate the risk. This vulnerability underscores the importance of input validation and secure coding practices in preventing XSS attacks.