PT-2026-67314 · Unknown · Better Auth+1

·

CVE-2026-67334

·

Published

2026-07-07

·

Updated

2026-08-01

CVSS v4.0

5.1

Medium

VectorAV:N/AC:L/AT:N/PR:H/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
Name of the Vulnerable Software and Affected Versions better-auth versions prior to 1.6.11 @better-auth/scim versions prior to 1.6.11
Description When secondaryStorage is configured and storeSessionInDatabase is set to false, certain user-deletion processes fail to remove cached sessions. This occurs because the internalAdapter.deleteUser(userId) function is called without first invoking internalAdapter.deleteSessions(userId), leaving the session payload in secondary storage. Consequently, session tokens for deleted users remain valid until the session Time To Live (TTL) expires, which is seven days by default, allowing unauthorized authentication and access to read and write surfaces.
The issue affects the following components:
  • The admin plugin when calling auth.api.removeUser(...) or authClient.admin.removeUser(...).
  • The anonymous plugin via the /delete-anonymous-user endpoint or the after-link hook.
  • The @better-auth/scim plugin via the DELETE /scim/v2/Users/:userId endpoint.
Recommendations Upgrade better-auth to version 1.6.11 or later. Upgrade @better-auth/scim to version 1.6.11 or later. Set session.storeSessionInDatabase to true to ensure database cascades remove sessions. When using auth.api.removeUser, manually call auth.api.revokeUserSessions({ body: { userId } }). For SCIM deprovisioning, call auth.api.revokeUserSessions(...) after the SCIM DELETE operation. In the onLinkAccount hook for anonymous users, explicitly call internalAdapter.deleteSessions(anonymousUser.user.id) before issuing a new session.

Exploit

Fix

Insufficient Session Expiration

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2026-67334
GHSA-2VG6-77G8-24MP

Affected Products

@Better-Auth/Scim
Better Auth