Stored Cross-Site Scripting (XSS) in Coolify
Affected Product: Coolify
Tested Version: v4.0.0-beta.420.6
Likely Affected: Prior versions are also vulnerable
Fixed in: v4.0.0-beta.420.7
Summary
Coolify versions prior to and including 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 (e.g., member role) can create a project with a maliciously crafted name containing embedded JavaScript. When an administrator later attempts to delete the project or its associated resource, the payload automatically executes in the admin’s browser context.
Impact
Successful exploitation leads to full compromise of the Coolify instance, including:
- Theft of API tokens and session cookies.
- Access to WebSocket-based terminal sessions on managed servers.
- Abuse of project management features with administrator privileges.
- Potential for persistence and privilege escalation when chained with other vulnerabilities.
Proof of Concept (PoC)
- Log in with a regular (non-admin/owner) account.
- Create a new project with the following malicious name:
<details x=xxxxxxxxxxxxxxxxxx:2 open ontoggle="prompt('PoC');">
3. Add any resource to the project (e.g., GitLab repo, Docker image).
4. When an administrator attempts to delete the project, the malicious JavaScript is executed in their browser.
Security Boundary Crossed
- From: Low-privileged member user
- To: Administrator session & full control of the Coolify instance
Recommendation
- Upgrade to Coolify v4.0.0-beta.359 or later.
- Sanitize and HTML-encode all user-supplied input (especially project names).
- Restrict usage of special characters in project metadata.
- Apply Content Security Policy (CSP) headers to reduce XSS impact.
Credit
Discovered by Eyodav
Stored Cross-Site Scripting (XSS) in Coolify
Affected Product: Coolify
Tested Version: v4.0.0-beta.420.6
Likely Affected: Prior versions are also vulnerable
Fixed in: v4.0.0-beta.420.7
Summary
Coolify versions prior to and including 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 (e.g., member role) can create a project with a maliciously crafted name containing embedded JavaScript. When an administrator later attempts to delete the project or its associated resource, the payload automatically executes in the admin’s browser context.
Impact
Successful exploitation leads to full compromise of the Coolify instance, including:
Proof of Concept (PoC)
<details x=xxxxxxxxxxxxxxxxxx:2 open ontoggle="prompt('PoC');">3. Add any resource to the project (e.g., GitLab repo, Docker image).
4. When an administrator attempts to delete the project, the malicious JavaScript is executed in their browser.
Security Boundary Crossed
Recommendation
Credit
Discovered by Eyodav