GHSA-C85H-5MRR-MGX4
better-auth: Organization admins can invite an owner with a padded role name
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-C85H-5MRR-MGX4 divulgada · CVSS 4.9 (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 you use the organization plugin from `better-auth` 1.5.5 or later, and a role other than the creator role can create invitations. With the default roles, organization admins can.
You are not affected if only the creator role (`owner` by default) can create invitations.
Summary
The organization plugin stops members who are not owners from inviting someone as an owner. A role value with extra whitespace passed this check, so an admin could invite an account they control as an owner.
Impact
An organization admin, or another non-creator role that can invite, can create a real owner account in the same organization. That owner can delete the organization and remove the original owners. The escalation stays inside an organization where the attacker can already invite members.
Patches
Upgrade `better-auth` to 1.7.16, or to 1.8.0-beta.5 on the beta line.
Role lists are now trimmed and split on commas wherever they are stored or compared, and invitations with an empty role are rejected.
Workarounds
Remove the invite permission from every role except the creator role, or reject invitation roles with leading or trailing whitespace before they reach Better Auth.
Audit existing invitations and memberships for role values that change when trimmed. Do not trim them in place: trimming `admin, owner` makes that member a real owner. Review owners invited by such members.
Technical details
The creator role check compared the raw role string, while later checks split and trimmed it. A value such as `" owner"` passed the first check and became `owner` when the invitation was accepted.
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-c85h-5mrr-mgx4Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
