Kritisch

Better Auth Has Two-Factor Authentication Bypass via Premature Session Caching (session.cookieCache)

  • Veröffentlicht: 03.04.2026
  • Aktualisiert: 11.10.2026 10:22

Summary

Under certain configurations, sessions may be considered valid before two-factor authentication (2FA) is fully completed. This can allow access to authenticated routes without verifying the second factor.


Description

When two-factor authentication is enabled, the authentication flow correctly identifies users who require additional verification and defers full authentication until the second factor is completed.

However, when session.cookieCache is enabled, the session generated during the initial sign-in step may be cached as valid prior to 2FA verification. Subsequent session lookups may then return this cached session without re-evaluating the 2FA requirement.

This results in a situation where session validity can be established before all authentication constraints are satisfied.


Impact

An attacker (or user) with valid primary credentials may gain access to protected application routes without completing the required second authentication factor.

Any application using better-auth with both two-factor authentication and session cookie caching enabled may be affected.


Mitigation

  • Upgrade to a version of better-auth that includes the fix for this issue.
  • Ensure that session caching does not treat sessions as fully authenticated until all required authentication steps, including 2FA, are completed.
  • As a temporary workaround, disable session.cookieCache when using two-factor authentication.

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
npm-Paket better-auth < 1.4.9 1.4.9

Verweise

CVSS-Wert -
CVSS-Vektor
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
Schwäche (CWE)
CWE-288
Plattform
npm
Paket
better-auth
Veröffentlicht
03.04.2026
Aktualisiert
11.10.2026 10:22

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-xg6x-h9c9-2m83 - CC BY 4.0

Schwachstellenhistorie: better-auth

Alle veröffentlichten Schwachstellen dieses Pakets (npm-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (22) im Archiv
Einträge insgesamt
22
Erste → letzte
12.2024 07.2026
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Kritisch 2
  • Hoch 14
  • Mittel 3
  • Niedrig 3

Veröffentlichungen pro Jahr

  1. 2024: 1
  2. 2025: 8
  3. 2026: 13
Schweregrad:
  1. Hoch · 8.3 CVE-2026-67327 >= 1.1.3, < 1.6.22, >= 1.7.0-beta.0, < 1.7.0-beta.10 1.6.22, 1.7.0-beta.10
  2. Hoch · 8.1 CVE-2026-53517 >= 1.4.8-beta.7, < 1.6.0 1.6.0
  3. Hoch · 7.7 CVE-2026-67333 < 1.6.13, >= 1.7.0-beta.0, < 1.7.0-beta.4 1.6.13, 1.7.0-beta.4
  4. Hoch · 7.3 CVE-2026-45364 < 1.4.17, >= 1.5.0-beta.1, < 1.5.0-beta.9 1.4.17, 1.5.0-beta.9
  5. Better Auth Has Two-Factor Authentication Bypass via Premature Session Caching (session.cookieCache) dieser Eintrag
    Kritisch CVE-2026-67337 < 1.4.9 1.4.9

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.