llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · @hono/oauth-providers

GHSA-6833-CXMV-FQJF

OAuth state and PKCE code verifier are generated with Math.random()

Parche disponible
Descargar PNG JSON
CVSS 3.1
4.2
Media
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche el mismo día de la divulgación
Exposición108 dDesde la divulgación, 3 ago 2026, 10:22 p. m.
Detección106 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 0.8.7
Monitoreo
Detectada +1
4 ago 26
18 nov 26
20 nov 26
4 ago 26
31 ago 26
27 sept 26
24 oct 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-6833-CXMV-FQJF divulgada · CVSS 4.2 (GitHub)
Remediación Parche 0.8.7 @hono/oauth-providers · 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
Summary

Every provider generated the OAuth `state` parameter with `Math.random()`, and the X (Twitter) provider generated its PKCE `code_verifier` the same way. `Math.random()` is not a cryptographically secure pseudorandom number generator, so neither value is unpredictable.

Details

The `state` parameter is the anti-CSRF token of the authorization flow and must be unguessable (RFC 6749 Section 10.12), and RFC 7636 Section 7.1 requires the PKCE `code_verifier` to come from a cryptographically secure generator. Both were derived from `Math.random()`, which V8 implements as xorshift128+: its internal state is recoverable from a small number of observed outputs, after which every subsequent value follows deterministically. The generator is a single stream shared across requests on an instance, and each authorization request emits a fresh `state` in a redirect URL that whoever initiated it can read.

This issue affects all providers. Applications that supply their own `state` through the `state` option, available on `googleAuth`, `msentraAuth` and `twitchAuth`, do not reach the affected path for that value.

Impact

An attacker able to sample the generator's output may predict `state` values issued to other requests on the same instance, defeating the protection the parameter provides. This may lead to:

  • Login CSRF, where the victim continues inside the attacker's account
  • Forced account linking, where the attacker's identity is attached to the victim's account

Recovering the generator state and aligning it with a concurrent request is intricate, which limits practical exploitation. On the X provider the same weakness applies to the `code_verifier`, which is what otherwise binds a callback to the browser that started the flow.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

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

Rangos afectados

Afectada Corregida Última
@hono/oauth-providers≤ 0.8.6
0.8.6
0.9.1
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npm@hono/oauth-providers
Corregida 0.8.7 0 d 0.9.1 no afectada
Versiones corregidas0.8.7
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/honojs/middleware/security/advisories/GHSA-6833-cxmv-fqjf

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