Skip to main content
VulnerabilityPublished

Better Auth: Stale sessions persist after user deletion across admin, anonymous, and SCIM flows

Affects better-authSource GCVE Database

0

CVSS 3.8 Low : upgrade to 1.6.11 when convenient.

Data as of 8 Jul 2026, 13:44 UTC

CVSS 3.1 base score
3.8Low
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 1.6.11
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:N

What to do

Upgrade better-auth and @better-auth/scim to 1.6.11.

Affected software

ProductAffectedFixed in
npmbetter-authAffected
  • >=0.3.4 <1.6.11
Fixed in
  • 1.6.11
npm@better-auth/scimAffected
  • >=1.6.0 <1.6.11
Fixed in
  • 1.6.11

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A fix is available in patched versions of better-auth and @better-auth/scim that ensure sessions are deleted before user records. Users should upgrade to these patched versions as soon as possible. If immediate upgrade is not feasible, workarounds include setting session.storeSessionInDatabase to true to leverage database cascades for session deletion, or explicitly revoking user sessions via API calls (auth.api.revokeUserSessions) in admin, SCIM, and anonymous user deletion flows. These mitigations eliminate the stale session persistence gap.

Description

A vulnerability in better-auth causes stale user sessions to persist after user deletion when using external session caches and the session is not stored in the database. This affects user deletion flows in the admin, anonymous, and SCIM plugins, allowing deleted users' sessions to remain valid until the session TTL expires (default 7 days). The issue is fixed in patched versions of better-auth and @better-auth/scim, which ensure sessions are deleted before user records. Workarounds include enabling session storage in the database or explicitly revoking sessions in code. The impact is limited to session persistence post-deletion, with no known exploits in the wild.

References

Community reviews

Loading reviews…