Skip to content
Threat Feed
critical advisory

Better Auth: OAuth state-to-Magic Link authentication bypass (CVE-2026-114607)

Better Auth is vulnerable to an authentication bypass where OAuth sign-in state can be used as a valid Magic Link token, allowing unauthenticated attackers to hijack user accounts or create unauthorized verified accounts.

CVE search metadata

CVE search record: CVE-2026-114607. Severity: critical. CVSS: 9.1. EPSS: 0.42%. KEV: no. Product: better-auth (< 1.7.7), better-auth (>= 1.3.8-beta.3, < 1.7.0-rc.3). Brief: Better Auth: OAuth state-to-Magic Link authentication bypass (CVE-2026-114607). Brief link: https://feed.craftedsignal.io/briefs/2026-10-better-auth-oauth-magic-link-bypass/

Triage facts

Revision 2
Applicability
better-auth (< 1.7.7), better-auth (>= 1.3.8-beta.3, < 1.7.0-rc.3)
Evidence
Unknown
Severity
Critical
Action
Immediate escalation
Sources
3 public sources
Freshness
Revision 2Oct 27, 17:58 UTC
Vulnerabilities
1 CVE
Source quality
A1Likely
Revision history 1 entry · Revision 2
  1. Revision 2

    added coverage for better-auth (>= 1.3.8-beta.3, < 1.7.0-rc.3)

    Changed: action_plan, affected_products, lastmod, references, tags, ttps, updates

    Sources: 1

Better Auth versions 1.4.0-beta.18 through 1.7.6 are vulnerable to an authentication bypass (CVE-2026-114607). The library incorrectly allows an OAuth sign-in state value to be accepted as a valid Magic Link token. An attacker can initiate an OAuth flow for a specific target email address, obtain the resulting state identifier, and submit it to the Magic Link endpoint to complete authentication as that user. This vulnerability persists if specific configurations regarding storeToken and storeIdentifier strategies are in use.

Attack Chain

  1. Attacker initiates an OAuth sign-in flow through Better Auth for a target email address.
  2. The application generates an OAuth state value to track this session.
  3. The attacker intercepts or extracts the OAuth state value associated with the target email address.
  4. The attacker submits the stolen OAuth state value to the Magic Link authentication endpoint.
  5. Better Auth erroneously treats the OAuth state value as a valid Magic Link token.
  6. The system grants the attacker a session associated with the target email address.

Impact

Successful exploitation allows an unauthenticated attacker to gain full access to any existing user account if the email address is known, bypassing the need for mailbox access. If Magic Link sign-up is enabled for a non-existent email address, the attacker can create an account that the system incorrectly marks as email-verified, which can be leveraged to bypass secondary security controls or access gated application features.

Recommendation

  • Upgrade better-auth to version 1.7.7 or later as soon as it is released.
  • Until the update is applied, prioritize switching account.storeStateStrategy to "cookie" if feasible, or disable the vulnerable combinations of Magic Link and social/Generic OAuth providers.
  • Ensure all internal Better Auth plugins, adapters, and integrations are updated in synchronization with the core library to ensure consistent verification logic.
  • Review and update custom verification.storeIdentifier.overrides to include the magic-link: and auth-state: prefixes as required by the upcoming security patch.

Immediate actions

Inventory all applications using Better Auth versions 1.4.0-beta.18 through 1.7.6

SOC 24h

Upgrade better-auth to 1.7.0 or later

Development 48h

Disable deviceAuthorization() plugin if immediate upgrade is not feasible

IT Operations 24h

Threat Hunt

Identify suspicious Magic Link authentication requests where the token pattern matches expected OAuth state formats

T1190 high medium confidence hunt now

Data: Application logs for /auth/magic-link and OAuth callback endpoints

Monitor application logs for frequent or anomalous calls to /device/code from unknown or suspicious client_id values

T1566.002 medium medium confidence hunt now

Data: Web server access logs, Application authentication logs

Mitigations

Set account.storeStateStrategy to 'cookie' or disable Magic Link/OAuth providers until 1.7.7 is available

immediate IT Operations

CVE-2026-114607

Upgrade to better-auth 1.7.0

immediate Development

better-auth (>= 1.3.8-beta.3, < 1.7.0-rc.3)