IT SBIT Services
Schneeberger
DEEN
CVE tracker

Better Auth: OAuth state accepted as Magic Link token enables account takeover

CVE-2026-114607Critical 9.1

← All vulnerabilities

Summary

Better Auth, an authentication library for TypeScript, can accept an OAuth sign-in state value as a Magic Link token under a specific combination of settings. An unauthenticated attacker who knows a user's email address can start an OAuth sign-in and redeem the returned state through Magic Link without access to the mailbox. This can yield a session for an existing user or an account marked as email-verified when sign-up is enabled.

Affected

  • better-auth from 1.4.0-beta.18 up to, but not including, 1.7.7
  • Only deployments with the Magic Link plugin, storeToken set to plain (or hashed with verification.storeIdentifier also hashed), a built-in social or Generic OAuth provider, and account.storeStateStrategy set to database

Fixed in

  • Fixed in better-auth 1.7.7 (released Sep 30, 2026)
  • Upgrade all @better-auth/* packages together with better-auth

Workaround

  • Turn off Magic Link sign-in, or turn off social and Generic OAuth sign-in, as stated by the vendor
  • Disabling sign-up on the Magic Link plugin is not sufficient
  • Unverified: set account.storeStateStrategy to cookie

Exploitation

  • No public proof-of-concept or reports of exploitation in the wild were found in the research.
  • CISA SSVC: Exploitation none, Automatable yes, Technical Impact total.
  • The CISA KEV catalogue was not checked directly.

Our recommendation

  • Check lockfiles for better-auth versions below 1.7.7 and upgrade to the latest 1.7.x release.
  • Review the auth configuration for Magic Link, social or Generic OAuth providers, storeToken, storeIdentifier and storeStateStrategy.
  • After upgrading, expire pending Magic Links and OAuth sign-ins, as they do not complete after the change.
  • Review accounts created or signed in via Magic Link during the exposure window.
  • Apply the workaround if patching is not possible immediately.

Public exploits

PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.

Research sources

Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 31 Oct 2026, 05:31.

Original description (NVD)

Better Auth is an authentication and authorization library for TypeScript. From 1.4.0-beta.18 until 1.7.7, deployments that enable Magic Link with storeToken set to plain, or with storeToken set to hashed and the global verification.storeIdentifier setting also set to hashed, enable a built-in social or Generic OAuth provider, and use account.storeStateStrategy set to database can accept an OAuth sign-in state value as a Magic Link token. These settings can cause Magic Link verification records and OAuth state to resolve to the same stored identifier, allowing an unauthenticated attacker to start OAuth sign-in for a known email address and redeem the returned state through Magic Link without controlling the mailbox or completing the provider callback. The attacker can obtain a normal session for an existing user, or create an account incorrectly marked as email verified when sign-up is enabled. This issue is fixed in version 1.7.7.

NVD references (4)

Sources

The tracker combines official, freely usable data sources – updated continuously:

This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.

Affected? We can help.

We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.