/

CVE-2026-86117

Severity:

HIGH RISK

(8.1)

Authentication Bypass (CWE-287) in Coolify OAuth Handler

CVE-2026-86117

Deferred

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-287

Impact:

Account Takeover

Severity:

HIGH RISK

(8.1)

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

A high-severity authentication bypass in Coolify's OAuth callback handler can authenticate a user based only on an email address, without adequately verifying the OAuth provider's identity assertion or binding the identity to an approved account.

If an attacker can register a victim's email address with an enabled OAuth provider and complete the callback flow, they may obtain an authenticated session as that victim, bypassing password and two-factor authentication controls.

Affected context

The vulnerability occurs in Coolify deployments that enable OAuth login and use a callback handler that maps provider-supplied email addresses directly to existing accounts. Risk is higher when the application does not require verified provider assertions, enforce trusted-provider policies, or maintain an explicit binding between local accounts and OAuth identities.

Exploit preconditions

  • Attack surface: OAuth authentication callback endpoint
  • Required access: Ability to create or control an identity on an OAuth provider accepted by the Coolify instance
  • Trigger point: Completion of the OAuth login and callback flow
  • Why exploitation is possible: The callback may trust an email address as sufficient identity proof without validating the provider assertion or confirming that the OAuth identity is bound to the account

Why this happens

The underlying bug is an account-identity validation failure. The OAuth callback uses an email address as the primary account-matching key while omitting or inadequately enforcing verification of provider claims and stable identity binding.

This maps to CWE-287: Improper Authentication, because the application accepts an authentication result without establishing that the OAuth identity is legitimately associated with the existing account. Email-address matching alone is not a sufficient substitute for provider-backed identity verification.

Potential impact

  • An attacker may obtain an authenticated session for another user's account
  • Password-based authentication requirements may be bypassed
  • Existing two-factor authentication protections may be circumvented
  • Administrative projects, deployments, or secrets could be exposed or modified
  • The affected account may be used for unauthorized operational or supply-chain activity

General mitigation guidance

Mitigation generally focuses on treating OAuth identities as verified external principals rather than trusting email addresses alone.

Common defensive patterns include:

  • Validate issuer, audience, signature, nonce, state, and other relevant provider assertions
  • Bind accounts to a stable, provider-specific subject identifier rather than email alone
  • Require verified email claims and apply explicit trusted-provider policies
  • Require deliberate account linking or reauthentication for existing accounts
  • Preserve local authentication and multi-factor requirements when linking identities
  • Apply least privilege to OAuth-created sessions and administrative accounts
  • Fail closed when identity claims are missing, ambiguous, or inconsistent

How teams detect issues like this

Organizations can look for authentication flows that use email addresses as the sole account-linking or account-selection key.

Useful approaches include:

  • Static analysis and code review for OAuth callbacks that map email claims directly to local users
  • Checks for missing issuer, audience, signature, nonce, state, or subject validation
  • Review of account-linking logic for explicit user consent and reauthentication
  • Monitoring for new OAuth identities, unusual provider changes, and sessions created without expected MFA events
  • Policy enforcement requiring approved OAuth providers and stable subject-based identity binding
  • Automated security review tools that flag improper authentication and unsafe account-linking patterns

Sources

SourceLink
github.comgithub.com/coollabsio/coolify
github.comgithub.com/coollabsio/coolify/blob/v4.3.17/app/Http/Controllers/OauthController.php
github.comgithub.com/coollabsio/coolify/blob/v4.3.17/routes/web.php
github.comgithub.com/geo-chen/oss/blob/main/coolify.md
vulncheck.comvulncheck.com/advisories/coolify-through-4.3.17-oauth-account-takeover-via-unverified-email-matching

Frequently asked

questions

It may be exploitable remotely through the OAuth login flow when the deployment accepts an attacker-controlled OAuth identity and the callback trusts its email address for account matching.

The attacker generally needs to control an identity on an OAuth provider enabled by the Coolify deployment and complete the provider callback process. Access to the victim's password is not necessarily required.

Verify all relevant OAuth assertions and bind accounts to a stable provider-specific subject identifier. Account linking should require explicit user action and appropriate reauthentication.

Use well-tested OAuth/OIDC libraries, enforce trusted-provider policies, treat email claims as non-authoritative unless independently verified, and test that password and MFA protections cannot be bypassed through alternate login paths.

Find out what's already
exploitable in your codebase.