Intel

AIKIDO-2026-356165

better-auth is vulnerable to Insufficient Session Expiration

GHSA-fvxx-76fc-893xPublished 3 days ago
November 4, 2026

42

CVE Score

Medium

Insufficient Session Expiration

Are you affected? Scan for Free

TL;DR

Revoked sessions in better-auth can remain valid in two cases. With secondaryStorage, the per-user session list is updated with a non-atomic read-then-write, so concurrent session changes can drop a token from the list and bulk revocation (revoke all sessions or ban user) misses that session. With session.cookieCache, passkey registration, device authorization, two-factor enrollment and verification, social account linking, and phone number changes accepted a cached (already revoked) session, letting it create a passkey or a new stored session that outlives the cache maxAge. Exploitation requires the attacker to already hold a valid session for the account; it lets them keep access after revocation but does not grant access without credentials. The fix records a cutoff time on bulk revocation and makes the affected routes read the session from the store instead of the cookie cache.

How do I fix this?

Upgrade the better-auth library to the patch version (and @better-auth/passkey as well if used). As a workaround, turn off session.cookieCache if revocation must take effect immediately, and stop using secondaryStorage for bulk revocation until you upgrade.

Who does this affect?

You are affected if you use better-auth with secondaryStorage (from 0.8.1), or with session.cookieCache together with passkey registration, device authorization, or passwordless two-factor enrollment (from 1.6.25), and you are using a version that falls within the vulnerable range.

Versions

0.8.1 - 1.7.15

Fixed in 1.7.16

Background info

better-auth is vulnerable to Insufficient Session Expiration in versions 0.8.1 - 1.7.15.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea