llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Hex · ash_authentication

GHSA-GX67-694C-655C

TOTP setup in AshAuthentication lets a user install their own authenticator secret on another user's account

Parche disponible
Descargar PNG JSON
CVSS 4.0
7.6
Alta
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión5.0.0-rc.16
Exposición17 dDesde la divulgación, 3 nov 2026, 10:31 a. m.
Detección17 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
3 nov 26
20 nov 26
3 nov 26
7 nov 26
12 nov 26
16 nov 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-GX67-694C-655C divulgada · CVSS 7.6 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Incorrect Authorization vulnerability in team-alembic ash_authentication allows a user with an account to install a TOTP secret they control on another user's account. With that, they can sign in as the victim or hold the victim's second factor.

With `confirm_setup_enabled? true`, TOTP setup takes two actions. `setup` generates a pending secret and returns it to the caller, together with a setup token. `confirm_setup` takes the setup token and a code, and saves the pending secret on the record it is called on. `AshAuthentication.Strategy.Totp.ConfirmSetupChange` checked that the setup token was genuine, but not that it was issued to that record. So an attacker could confirm their own pending secret onto another user's record.

The TOTP setup changes also marked their own changesets as AshAuthentication interactions, which the standard `bypass AshAuthentication.Checks.AshAuthenticationInteraction` policy lets through. As a result, a policy limiting these actions to the actor's own record did not apply when `setup` or `confirm_setup` was called directly. A direct call to `setup` on another user's record returned that user's own pending secret and setup token. In single-step setup, it replaced that user's secret.

With `sign_in_enabled? true`, the installed secret is enough to sign in as the victim using their email address and a code. Without it, the attacker holds the victim's second factor.

Configurations

Reachable when the application exposes the TOTP `setup` or `confirm_setup` action on a record the caller identifies, and the attacker can read the victim's user record. Examples of such exposure are AshJsonApi, AshGraphql, or a controller that passes a user it looked up to `AshAuthentication.Strategy.Totp.Actions.confirm_setup/3`. The routes that AshAuthentication and AshAuthenticationPhoenix provide always use the signed-in user and are not affected.

Workarounds

Do not expose `setup` or `confirm_setup` on a record the caller chooses. Call them through `AshAuthentication.Strategy.Totp.Actions` with the signed-in user instead, as the built-in routes do. When the actions are exposed through AshJsonApi or AshGraphql, a read policy that only lets users read their own record also blocks the attack, because those load the record through it before the action runs.

Patches

Fixed in ash_authentication `5.0.0-rc.16`.

  • `confirm_setup` now refuses a setup token whose `sub` claim does not name the record.
  • The TOTP setup changes no longer mark their changesets as AshAuthentication interactions. `AshAuthentication.Strategy.Totp.Actions` still does, for the record it is given, so direct calls to the actions now follow the resource's policies. Applications that call these actions directly and relied on the bypass need a policy that permits the actor.
  • The same token check was added to `AshAuthentication.Strategy.Password.ResetTokenValidation`.
Vector CVSS 4.0

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
Requisitos de ataqueAT:P
NingunoPresentes
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaPasivaActiva
Confid. (sistema)VC:H
AltoBajoNinguno
Integridad (sistema)VI:H
AltoBajoNinguno
Disponib. (sistema)VA:N
AltoBajoNinguno
Confid. (posterior)SC:N
AltoBajoNinguno
Integridad (posterior)SI:N
AltoBajoNinguno
Disponib. (posterior)SA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida
ash_authentication≥ 5.0.0-rc.0 < 5.0.0-rc.16
5.0.0-rc.0
5.0.0-rc.16
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Hexash_authentication
Corregida 5.0.0-rc.16 — —
Versiones corregidas5.0.0-rc.16
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/team-alembic/ash_authentication/security/advisories/GHSA-gx67-694c-655c

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