GHSA-FVXX-76FC-893X
better-auth: Revoked sessions can stay valid with secondary storage or the cookie cache
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-FVXX-76FC-893X divulgada · CVSS 4.2 (GitHub) | |
| Remediación | Parche 1.7.16 | better-auth · 0 d desde divulgación | |
| Remediación | Parche 1.8.0-beta.5 | better-auth · 0 d desde divulgación | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Am I affected?
You are affected if you use `better-auth` with any of these:
- `secondaryStorage`, from 0.8.1-beta.5.
- `session.cookieCache` with passkey registration, device authorization, or passwordless two-factor enrollment, from 1.6.25.
Summary
Bulk revocation. With secondary storage, two session changes at the same time could drop a session from the user's session list. Revoking all sessions or banning the user then missed it.
Cached sessions. With the cookie cache, a revoked session keeps working until the cache `maxAge` ends, which is documented. Some features accepted that cached session to create a passkey or a new stored session that outlived the cache.
Impact
Both problems need an attacker who already holds a valid session for the account. They let that attacker keep access after the session is revoked. Neither problem gives access to an account without credentials.
Patches
Upgrade `better-auth` and `@better-auth/passkey` to 1.7.16, or to 1.8.0-beta.5 on the beta line.
Passkey registration, device authorization, two-factor enrollment and verification, social account linking, and phone number changes now check the session store, even with the cookie cache on. On 1.7.16, sessions created from API keys are refused on these routes, except two-factor enrollment and phone number changes. On 1.8.0-beta.5, they are refused on all of them.
Workarounds
Turn off `session.cookieCache` if revocation must take effect immediately. For bulk revocation, stop using `secondaryStorage` until you upgrade.
Technical details
The secondary storage session list is updated by reading and writing it in two steps, so concurrent writers could drop a token. Bulk revocation now also records a cutoff time, and sessions created before it count as revoked even when the list missed them. The affected routes now read the session from the store instead of the cookie cache before creating a lasting credential or session.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npmbetter-auth |
Corregida | 1.7.16, 1.8.0-beta.5 | 0 d · 0 d | 1.7.25 no afectada |
npm@better-auth/passkey |
Corregida | 1.7.16, 1.8.0-beta.5 | 0 d · 0 d | 1.7.25 no afectada |
1.7.161.8.0-beta.5Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/better-auth/better-auth/security/advisories/GHSA-fvxx-76fc-893xLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
