GHSA-G95C-WQVR-8C3J
better-auth: Admin roles with user:update can change another user's phone number
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-G95C-WQVR-8C3J divulgada · CVSS 6.8 (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 |
Am I affected?
You are affected if all of these are true:
- You use the admin plugin and the phone number plugin from `better-auth`.
- A role other than the full admin role holds the `user:update` permission.
You are not affected if only full administrators can update users.
Summary
The admin `update-user` endpoint requires a separate permission to change a user's email address, but not to change their phone number. A role allowed to edit user profiles could set another user's phone number and mark it as verified.
Impact
A user with a limited role that holds `user:update` can put their own phone number on another user's account and then sign in to that account with a phone OTP. This gives them the other user's session, including accounts with more privileges than their own.
Patches
Upgrade `better-auth` to 1.7.16, or to 1.8.0-beta.5 on the beta line.
Changing `phoneNumber` or `phoneNumberVerified` through `update-user` now needs the new `user:set-phone` permission. The default admin role has it. If you use custom access control, add `set-phone` to your statements and grant it to the roles that should change phone numbers.
Workarounds
Remove `user:update` from roles that should not change sign-in details, or reject `phoneNumber` and `phoneNumberVerified` in requests to `/admin/update-user` before they reach Better Auth.
Technical details
`/admin/update-user` checked `user:set-email` before changing the email address, but passed phone fields through with only `user:update`. It now checks `user:set-phone` when either phone field is present.
Credit
Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-938BEJ5J.
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.26 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-g95c-wqvr-8c3jLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
