---
id: "CVE-2026-114607"
kind: "vulnerability"
aliases: ["CVE-2026-114607"]
title: "Better Auth: Magic Link accepts OAuth state, giving attacker existing user sessions"
severity: "critical"
cvss: 9.1
epss: 0.00347
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["better-auth", "node", "package", "typescript"]
not_affected_if: ["magic-link-disabled", "no-social-or-generic-oauth-provider", "storestatestrategy-not-database", "version-1.7.7-or-later"]
published_at: "2026-10-22T17:16:58+00:00"
first_seen_at: "2026-10-23T21:57:31+00:00"
updated_at: "2026-10-24T07:15:51+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-114607", "first_seen_at": "2026-10-23T21:57:31+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-114607", "first_seen_at": "2026-10-24T07:15:51+00:00"}]
---

# Better Auth: Magic Link accepts OAuth state, giving attacker existing user sessions

Better Auth versions from 1.4.0-beta.18 through 1.7.7 let a Magic Link token be an OAuth sign-in state value under certain storage settings. An unauthenticated attacker can start OAuth sign-in for a known email, redeem the returned state as a Magic Link, and get a session for an existing user or an account marked email verified.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

Check the installed better-auth version (for example, npm ls better-auth); affected if below 1.7.7. Look for magicLink with storeToken set to plain, or hashed with verification.storeIdentifier set to hashed, plus a social or Generic OAuth provider and account.storeStateStrategy set to database.

## Fix

Upgrade better-auth to 1.7.7 or later.

## Timeline

- 2026-10-23T21:57:31+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-114607
- 2026-10-24T07:15:51+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-114607

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
