llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · @better-auth/kysely-adapter

GHSA-48C2-W96J-MV3M

@better-auth/kysely-adapter: MySQL serial IDs can return another request's record

Parche disponible
Descargar PNG JSON
CVSS 3.1
6.8
Media
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche2 versionesPrimer parche el mismo día de la divulgación
Exposición16 dDesde la divulgación, 3 nov 2026, 4:39 p. m.
Detección14 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Parche 1.7.16 +1
Monitoreo
Detectada +1
3 nov 26
18 nov 26
19 nov 26
3 nov 26
7 nov 26
11 nov 26
15 nov 26
19 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-48C2-W96J-MV3M divulgada · CVSS 6.8 (GitHub)
Remediación Parche 1.7.16 @better-auth/kysely-adapter · 0 d desde divulgación
Remediación Parche 1.8.0-beta.5 @better-auth/kysely-adapter · 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
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Am I affected?

You are affected if all of these are true:

  • Your database is MySQL or MariaDB.
  • You set `advanced.database.generateId: "serial"`.
  • You use the default Kysely adapter or the Drizzle adapter with a connection pool.

You are not affected with other databases or other ID settings.

Summary

After inserting a row, the adapter read the new ID back with a separate query. On a connection pool, that query could run on a different connection and return the ID of a row inserted by another request.

Impact

Under ordinary concurrent load, a user who signs in can receive another user's session and act as that user. A sign-up can also return another user's record. Other requests fail with an error. The attacker cannot choose which account they receive.

Patches

Upgrade `better-auth` and your adapter package (`@better-auth/kysely-adapter` or `@better-auth/drizzle-adapter`) to 1.7.16, or to 1.8.0-beta.5 on the beta line.

Workarounds

If you cannot upgrade, stop using `generateId: "serial"` on MySQL. A single-connection pool does not prevent this.

Technical details

The MySQL branch ran the insert on the pool and then read `LAST_INSERT_ID()` in a separate transaction. `LAST_INSERT_ID()` is scoped to a connection, so the second query could see another request's insert. The adapters now use the ID reported by the insert itself, and fail instead of guessing when no ID is reported.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:H
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
better-auth< 1.7.16
@better-auth/kysely-adapter · @better-auth/drizzle-adapter≥ 1.5.0-beta.9 < 1.7.16
@better-auth/kysely-adapter · @better-auth/drizzle-adapter · better-auth≥ 1.8.0-beta.0 < 1.8.0-beta.5
1.5.0-beta.9
1.7.16
1.7.25
1.8.0-beta.0
1.8.0-beta.5
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npm@better-auth/kysely-adapter
Corregida 1.7.16, 1.8.0-beta.5 0 d · 0 d 1.7.25 no afectada
npm@better-auth/drizzle-adapter
Corregida 1.7.16, 1.8.0-beta.5 0 d · 0 d 1.7.25 no afectada
npmbetter-auth
Corregida 1.7.16, 1.8.0-beta.5 0 d · 0 d 1.7.25 no afectada
Versiones corregidas1.7.161.8.0-beta.5
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/better-auth/better-auth/security/advisories/GHSA-48c2-w96j-mv3m

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.