better-auth: OAuth state can be used as a Magic Link to sign in as another user
CVE-2026-114607
Am I affected? You may be affected if you use better-auth from 1.4.0-beta.18 through versions before 1.7.7 with the Magic Link plugin and social or Generic OAuth sign-in. You are affected if all of these are true: Magic Link is enabled with default storeToken: "plain", or with storeToken: "hashed" and global verification.storeIdentifier: "hashed" (including a hashed default). At least one built-in social provider or Generic OAuth provider is enabled. OAuth state uses account.storeStateStrategy: "database", the default when a database or secondary storage is configured. Cookie-backed state blocks this path, subject to the OAuth Proxy condition below. With custom hashers, confirm the flows cannot resolve to the same stored identifier. Summary Better Auth accepts an OAuth sign-in state value as a Magic Link token. An attacker can start an OAuth sign-in with any email address and use the returned state value to finish a Magic Link sign-in for that address. They never prove that they can read that email. Impact An unauthenticated attacker who knows a user's email address can get a normal session for that user, with all of that account's permissions. They need no access to the mailbox,…
Assessment
- CVSS
- 9.1 (v3.1)
- Severity
- Critical
- EPSS
- 0.0042% chance of exploitation in the next 30 days
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
- Published
- 27 October 2026
- Last updated
- 27 October 2026
- Affected
- npm · better-auth
- Weakness
- CWE-287
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
At the source
References
- https://github.com/better-auth/better-auth/security/advisories/GHSA-965c-763c-88jm
- https://nvd.nist.gov/vuln/detail/CVE-2026-114607
- https://github.com/better-auth/better-auth/pull/11494
- https://github.com/better-auth/better-auth/commit/ac54bfd67821a7607533af2059858b12bc54e26a
- https://github.com/better-auth/better-auth/releases/tag/v1.7.7
- https://github.com/advisories/GHSA-965c-763c-88jm
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2026-114607