Race Condition Affecting better-auth package, versions >=0.8.1-beta.5 <1.7.16>=1.8.0-beta.0 <1.8.0-beta.5


Severity

Recommended
0.0
low
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.14% (4th 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 IDSNYK-JS-BETTERAUTH-23050775
  • published30 Nov 2026
  • disclosed21 Nov 2026
  • creditkumama-nui, 5255fgh, ebadfd

Introduced: 21 Nov 2026

NewCVE-2026-134321  (opens in a new tab)
CWE-362  (opens in a new tab)

How to fix?

Upgrade better-auth to version 1.7.16, 1.8.0-beta.5 or higher.

Overview

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

Affected versions of this package are vulnerable to Race Condition via non-atomic secondary storage session list updates and cookie-cached session trust on sensitive routes. When secondaryStorage is in use, two concurrent session changes can cause a session to be dropped from the user's session list, allowing it to survive bulk revocation or a user ban. Additionally, when session.cookieCache is enabled, certain routes (passkey registration, device authorization, and passwordless two-factor enrollment) accept a revoked cached session to create a passkey or a new stored session that outlives the cache expiry, letting an attacker retain access after their session is revoked.

Note: This is only exploitable if secondaryStorage is configured (for the bulk revocation bypass) or session.cookieCache is enabled alongside passkey registration, device authorization, or passwordless two-factor enrollment (for the cached session bypass).

References

CVSS Base Scores

version 4.0
version 3.1