/

CVE-2025-64421

Severity:

HIGH RISK

(8.0)

Broken Access Control / Authorization Logic Error

CVE-2025-64421

Analyzed

Vulnerability type

Category:

Broken Access Control / Authorization Logic Error

CWE:

CWE-863

Impact:

Privilege Escalation to Administrator

Severity:

HIGH RISK

(8.0)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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.

Sources

SourceLink
drive.google.comdrive.google.com/file/d/1YZHFgiZv_k9p9909A63DAErsTsh8K1rc/view?usp=drive_link
github.comgithub.com/coollabsio/coolify/security/advisories/GHSA-4p6r-m39m-9cm9

Frequently asked

questions

Exploitation is limited to environments where an attacker can obtain or create a low-privileged member account on the affected Coolify instance. Within such environments, the issue can reliably lead to administrator-level compromise using only the web interface.

No. The vulnerability is exploitable through normal application workflows in the Coolify UI or corresponding HTTP endpoints. Only valid member-level credentials and access to the invitation functionality are required.

The safest fix is to enforce centralized, server-side authorization checks on every operation that creates, invites, or modifies high-privilege accounts, and to ensure that no code path for invitations can bypass these checks. Any role escalation or admin creation should be strictly restricted to existing admins and validated in the backend.

Use a unified authorization layer for all sensitive operations, adopt explicit RBAC policies for role and permission changes, and incorporate automated tests that attempt role escalation from low-privileged accounts. Regular security reviews of multi-step workflows—like invitations, sign-ups, and password reset flows—help identify inconsistent or missing access checks before release.

Find out what's already
exploitable in your codebase.