llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · better-auth

GHSA-Q747-MQGR-4GH7

better-auth: Phone numbers can be claimed before they are verified

Parche disponible
Descargar PNG JSON
CVSS 3.1
8.1
Alta
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/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:37 p. m.
Detección14 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 1.7.16 +1
Monitoreo
Detectada +1
3 nov 26
18 nov 26
20 nov 26
3 nov 26
8 nov 26
12 nov 26
16 nov 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-Q747-MQGR-4GH7 divulgada · CVSS 8.1 (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
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 you use the phone number plugin from `better-auth` 0.4.12-beta.7 or later.

The shared code problem below affects 1.2.6-beta.8 and later, when you have not set a custom `verifyOTP` function.

Summary

Unverified numbers. Sign-up and other flows could save a phone number on an account before anyone proved they own it. Phone sign-in then picked whichever account held the number. A one-time code (OTP) proves who controls the phone, not who owns that account.

Shared codes. Phone verification codes were stored next to codes from other flows without a separate namespace. Wrong phone attempts could delete a pending code that another flow issued to a different user.

Impact

An attacker can save a victim's phone number on an account the attacker controls. When the victim later signs in with a valid OTP sent to their own phone, the victim gets a session for the attacker's account. Data the victim then enters may become available to the attacker. The attacker does not intercept or bypass the OTP, and does not get into the victim's own account.

With the shared code problem, anyone who can predict a pending code's record identifier can cancel it repeatedly. This blocks that user's sign-in or recovery attempt. It does not give access to the account.

Patches

Upgrade `better-auth` to 1.7.16, or to 1.8.0-beta.5 on the beta line.

1.7.16 stops new unverified numbers. Sign-up and sign-in requests that send a `phoneNumber` are rejected, and a number from a social profile is not stored, including on account linking. 1.8.0-beta.5 also requires proof of account ownership before a pending number is verified, which covers numbers saved before the upgrade.

On 1.7.16, clear numbers saved before the upgrade as shown in Workarounds.

Workarounds

Clear phone numbers that were never verified. For example, on PostgreSQL with the default schema names:

UPDATE "user" SET "phoneNumber" = NULL
WHERE "phoneNumber" IS NOT NULL AND "phoneNumberVerified" IS NOT TRUE;

Users who had not finished verification need to add their number again.

Until you upgrade, stop public flows from saving `phoneNumber` before verification, for example by removing it from sign-up request bodies. A strict `phoneNumberValidator` reduces the shared code problem but does not fix it.

Technical details

Phone OTP sign-in and verification looked up the account by `phoneNumber` without requiring `phoneNumberVerified`. 1.7.16 rejects a `phoneNumber` in sign-up and sign-in request bodies, drops an unverified number from `createUser` data and social profiles, and drops an unverified number written during a request outside the plugin's verification path and the admin update route. Verification codes now use a phone-specific identifier. With `requireVerification`, phone password reset now also needs a verified number.

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:L
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:R
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
better-auth≥ 0.4.12-beta.7 < 1.7.16
better-auth≥ 1.8.0-beta.0 < 1.8.0-beta.5
0.4.12-beta.7
1.7.16
1.7.26
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
npmbetter-auth
Corregida 1.7.16, 1.8.0-beta.5 0 d · 0 d 1.7.26 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-q747-mqgr-4gh7

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