/

CVE-2026-80192

Severity:

HIGH RISK

(8.1)

Improper Authentication (CWE-287) in Better Auth SSO

CVE-2026-80192

Deferred

Vulnerability type

Category:

Improper Authentication

CWE:

CWE-287

Impact:

Unauthorized organization membership and potential 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

Better Auth SSO contains domain-ownership flaws that can let an authenticated organization administrator claim an unverified email domain or exploit a verification race. Depending on configuration, matching users may be added to an attacker-controlled organization or an attacker-controlled identity provider may be linked to an existing account.

Affected context

The issue occurs in deployments using the Better Auth SSO plugin, with the organization plugin also required for the automatic-assignment path. Risk depends on domain-verification settings, provider update behavior, implicit account linking, and whether an authenticated organization owner or administrator can register or modify SSO providers.

Exploit preconditions

  • Attack surface: SSO provider registration, domain verification, provider update, and automatic organization assignment
  • Required access: Authenticated organization owner or administrator access for the domain-claiming path; the account-linking path depends on the exposed provider-management and verification workflows
  • Trigger point: Registration or update of an SSO provider, DNS-domain verification, or implicit linking of an identity to an existing account
  • Configuration requirements: The SSO plugin must be enabled; the organization plugin and automatic assignment must be enabled for the organization-membership path
  • Why exploitation is possible: Domain ownership is not consistently bound to the provider and verified domain throughout the workflow, while concurrent updates may cause proof for one domain to be applied to another

Why this happens

The vulnerability reflects improper authentication and authorization of domain ownership, mapping to CWE-287: Improper Authentication. One insecure pattern accepts a provider's asserted domain when verification is disabled, allowing an authenticated administrator to associate an arbitrary domain with an organization. A separate race condition permits domain-verification state to become associated with a different provider domain during concurrent operations. Implicit account linking can then treat an attacker-controlled identity provider as trusted without sufficiently binding the verified domain, provider, and target account.

Potential impact

  • Users with matching email domains could be added to an attacker-controlled organization
  • Affected users could receive unintended default organization permissions
  • An attacker-controlled identity provider could be linked to an existing user account
  • Accounts or organization resources could be accessed without the intended domain-owner authorization
  • Organizational data could be exposed, modified, or deleted

General mitigation guidance

Mitigation generally focuses on making domain ownership an explicit, consistently enforced trust boundary.

Common defensive patterns include:

  • Require successful, domain-specific verification before accepting a provider or assigning users automatically
  • Bind verification records cryptographically or transactionally to the exact provider, domain, and organization being updated
  • Make verification and provider updates atomic, or reject stale and conflicting state transitions
  • Avoid implicit account linking unless strong identity and domain correspondence checks succeed
  • Apply least privilege to organization administrators and use explicit approval for provider registration
  • Prefer secure-by-default settings that keep automatic assignment and implicit linking disabled
  • Record and alert on provider changes, verification attempts, membership assignments, and account-linking events

How teams detect issues like this

Detection can combine static analysis, workflow review, and runtime policy enforcement.

  • Search for provider-management code that trusts user-supplied domains when verification is disabled
  • Review whether verification state is checked against the exact domain, provider, organization, and current update version
  • Identify non-atomic verify-then-update workflows and mutable shared verification state
  • Flag implicit account-linking logic that lacks strong identity, issuer, and verified-domain checks
  • Use integration tests with concurrent verification and provider-update requests
  • Enforce policies requiring verified domains for automatic organization assignment and requiring approval for identity-provider changes
  • Monitor for unexpected domain claims, rapid provider changes, cross-organization membership assignments, and new identity links
  • Neutral automated security review tools may help identify missing authorization checks and race-prone state transitions

Sources

SourceLink
github.comgithub.com/better-auth/better-auth/security/advisories/GHSA-8c5h-wx78-2cfg
vulncheck.comvulncheck.com/advisories/better-auth-sso-before-1.6.27-domain-ownership-authentication-bypass

Frequently asked

questions

Yes, where the affected SSO and organization workflows are exposed to an authenticated organization owner or administrator. The exact scope depends on enabled plugins and configuration.

The unverified-domain organization-assignment path requires an authenticated organization owner or administrator. The domain-verification race may depend on which users can access provider-management operations, so deployments should review those permissions carefully.

Require verified ownership for every domain-sensitive operation, bind verification to the exact provider and organization, and make verification and provider updates atomic. Avoid implicit account linking unless identity and domain checks are independently satisfied.

Use secure-by-default verification settings, enforce least privilege, test concurrent state transitions, require explicit approval for identity-provider changes, and monitor domain claims and account-linking events.

Find out what's already
exploitable in your codebase.