Summary
Coolify versions up to and including v4.0.0-beta.434 contain an authorization logic flaw that allows a low-privileged member to successfully invite a high-privilege administrator account despite initial access checks.
By repeatedly triggering the invitation action, a member can create an administrator-level user tied to their own email and then use password reset to gain full administrative control of the Coolify instance.
Affected context
The vulnerability occurs in the user and team invitation flow of Coolify instances where:
- Role-based access control is expected to limit who can invite administrator-level accounts.
- Members have access to the UI control for inviting users to a workspace or instance.
- The backend applies inconsistent or incomplete authorization checks across the invitation process.
It becomes risky in multi-user deployments where member accounts are present and invite functionality is exposed to non-admins.
Exploit preconditions
- Attack surface: Coolify web interface (user invitation and team management endpoints).
- Required access: A valid low-privileged member account on the Coolify instance.
- Trigger point: Repeatedly clicking the "invite" control to add a user with administrator privileges, even after an initial error.
- Why exploitation is possible: The system performs an authorization check that fails on the first attempt but still processes and persists the invitation on a subsequent attempt, allowing a member to create or invite an admin-level identity linked to their own email and then use password reset to assume that admin account.
Why this happens
This issue stems from inconsistent enforcement of authorization rules across different stages of the invitation workflow.
While the UI or initial backend call signals an error when a member attempts to invite a high-privilege user, a subsequent click triggers a code path that bypasses or skips the original privilege check and still processes the invite.
At an abstract level, this maps to CWE-863: Incorrect Authorization, where the system evaluates user permissions incorrectly for a critical operation (creating or inviting an administrator) and allows an actor with insufficient privileges to perform it.
The underlying bug class is a broken access control pattern: client-visible validation is not aligned with definitive, server-side authorization logic for each state transition in the invitation process.
Potential impact
- A low-privileged member can escalate their privileges to administrator.
- Full administrative control of the Coolify instance, including server, application, and database management.
- Ability to modify deployments, change configuration, and access sensitive operational data.
- Creation of additional privileged backdoor accounts to maintain persistence.
- Potential impact on downstream infrastructure managed through the compromised Coolify instance.
General mitigation guidance
Mitigation should focus on enforcing strict, centralized authorization for all privilege-changing operations and ensuring consistency between UI behavior and backend logic.
Pattern-based mitigations include:
- Applying server-side authorization checks on every invitation and role-assignment action, regardless of UI state or number of attempts.
- Treating "invite user as admin" and "change user role to admin" as privileged operations governed by explicit, declarative access control policies.
- Implementing role-based access control (RBAC) that is enforced via a single, reusable authorization layer instead of scattered conditional checks.
- Validating that role escalation (e.g., member → admin) can only originate from existing admins and not from self-service flows.
- Using stateful guards in workflows (e.g., invitations) so that transient UI errors cannot be bypassed by replaying or repeating the same request.
- Logging and alerting on unusual role changes or invitations to admin accounts to facilitate operational response.
How teams detect issues like this
Detection can focus on both code-level patterns and runtime behavior:
Static and code review strategies
- Look for invitation or user-management endpoints that do not consistently call a centralized authorization function/policy.
- Flag controller or service methods that modify user roles, groups, or permissions but rely only on client-side validation or UI role checks.
- Use static analysis or custom linting rules to identify privilege-affecting operations (e.g.,
role = 'admin') that lack explicit access checks. - Review multi-step workflows (invites, sign-ups, password resets) for missing authorization on intermediate states and retries.
Runtime and policy-based detection
- Monitor audit logs for patterns where member-level accounts initiate admin invitations or role changes.
- Set up anomaly detection on role elevation events, particularly when originating from non-admin sessions.
- Employ automated security testing or fuzzing of the invitation API to replay and repeat actions and observe inconsistent authorization outcomes.

