Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. better-auth
  4. ›
  5. GHSA-2vg6-77g8-24mp

GHSA-2vg6-77g8-24mp: Better Auth: Stale sessions persist after user deletion across admin, anonymous, and SCIM flows

July 7, 2026

When secondaryStorage is configured and storeSessionInDatabase is false, three user-deletion endpoints in better-auth plus one in @better-auth/scim call internalAdapter.deleteUser(userId) without first calling internalAdapter.deleteSessions(userId). The deleted user’s session payload (which carries a cached user object) remains in secondary storage, and internalAdapter.findSession(token) keeps returning it as a valid session until the session TTL elapses (default 7 days).

References

  • github.com/advisories/GHSA-2vg6-77g8-24mp
  • github.com/better-auth/better-auth/releases/tag/v1.6.11
  • github.com/better-auth/better-auth/security/advisories/GHSA-2vg6-77g8-24mp

Code Behaviors & Features

Detect and mitigate GHSA-2vg6-77g8-24mp with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.3.4 before 1.6.11

Fixed versions

  • 1.6.11

Solution

Upgrade to version 1.6.11 or above.

Impact 3.8 LOW

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-459: Incomplete Cleanup
  • CWE-613: Insufficient Session Expiration
  • CWE-672: Operation on a Resource after Expiration or Release

Source file

npm/better-auth/GHSA-2vg6-77g8-24mp.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 19 Jul 2026 12:18:04 +0000.