Improper Authentication Affecting better-auth package, versions >=1.4.0-beta.18 <1.7.7


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.32% (24th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Improper Authentication vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-BETTERAUTH-21182568
  • published18 Oct 2026
  • disclosed15 Oct 2026
  • creditrick-v12, bazumo

Introduced: 15 Oct 2026

NewCVE-2026-110862  (opens in a new tab)
CWE-287  (opens in a new tab)

How to fix?

Upgrade better-auth to version 1.7.7 or higher.

Overview

better-auth is a The most comprehensive authentication library for TypeScript.

Affected versions of this package are vulnerable to Improper Authentication via insufficient isolation between verification record types, allowing an attacker to substitute a token issued for one authentication flow (e.g. an OAuth state token) in place of a magic-link verification token. Because verification records stored in the database share a common identifier namespace and the magic-link handler does not validate the type field of the retrieved record, an attacker who obtains a valid token from one flow can present it to a different flow's endpoint to authenticate as the token's associated email address without ever receiving a legitimate magic-link email.

Note: This is only exploitable when OAuth state uses account.storeStateStrategy: "database", which is the default when a database or secondary storage is configured.

CVSS Base Scores

version 4.0
version 3.1