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.42% (36th 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-21460700
  • published23 Oct 2026
  • disclosed22 Oct 2026
  • creditrick-v12, Moritz Schneider

Introduced: 22 Oct 2026

NewCVE-2026-114607  (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 of verification records across different authentication flows. Because magic-link tokens and OAuth state tokens share the same verification storage namespace without purpose-binding, an attacker can substitute a verification record from one flow (e.g., an OAuth state token) in place of a magic-link token to satisfy the magic-link verification check, bypassing authentication and potentially gaining unauthorized account access.

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