CVE-2026-107722nearform fast-jwt
Bypass de autenticación por clasificación incorrecta de clave RSA en fast-jwt
Crítica 9.8 Sin autenticación
Seguir: esta CVE · nearform · nearform fast-jwt Te avisamos por email o Slack (requiere cuenta).
- Prioridad
- 74
- CVSS 3.1
- 9.8
- EPSS
- —
- Requiere autenticación
- No
- Publicada
- 8 oct 2026
- Actualizada
- 13 oct 2026
- Categoría
- Aplicación · Multiplataforma
- Debilidad (CWE)
- CWE-347
- SSVC (CISA)
- Explotación: prueba de concepto · Automatizable: sí · Impacto técnico: total
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Qué pasa
fast-jwt versiones 6.2.0 a 6.3.0 pueden clasificar incorrectamente claves públicas RSA como secretos HMAC cuando el contenido tiene caracteres no espaciables antes del encabezado PEM. Un atacante que conoce los bytes de la clave pública puede firmar reclamaciones HS256 arbitrarias, resultando en bypass de autenticación o autorización cuando HS256 está permitido.
Ver el texto original de NVD (en inglés)
fast-jwt provides fast JSON Web Token (JWT) implementation. From 6.2.0 until 6.3.0, fast-jwt can misclassify RSA public-key text as an HMAC secret when the key has non-whitespace content before its PEM header. In src/crypto.js, performDetectPublicKeyAlgorithms trims whitespace but publicKeyPemMatcher remains start-anchored, so comments, control characters, zero-width characters, or wrapper text can prevent PEM detection and reach the HMAC fallback. An attacker who knows the public key bytes can sign arbitrary HS256 claims with that public material when HS256 is inferred or allowed, resulting in authentication or authorization bypass. An asymmetric-only algorithm allowlist prevents the attack. This issue is fixed in version 6.3.0.
Qué hacer
Hay parche · versiones corregidas: 6.3.0
Actualiza fast-jwt a versión 6.3.0 o superior. Alternativamente, usa una lista de algoritmos permitidos que solo incluya algoritmos asimétricos.
- Aplica la actualización de seguridad del fabricante para fast-jwt.
- Se explota sin autenticación: si no puedes parchear ya, limita el acceso desde Internet al servicio afectado.
Paquetes afectados
| Ecosistema | Paquete | Versiones afectadas | Corregida en | Cómo actualizar |
|---|---|---|---|---|
| npm | fast-jwt |
≥ 6.2.0 < 6.3.0 |
6.3.0 |
npm install fast-jwt@6.3.0 |
Según OSV / GitHub Advisories (GHSA-ww5h-9m49-7xx4). Verifica la versión en tu lockfile antes de actualizar.
Productos afectados
- nearform · fast-jwt
Según el CNA que publicó la CVE. NVD todavía no cargó los CPE con versiones.
Fuentes oficiales
Referencias
Enlaces publicados por las fuentes. Ábrelos con criterio.