llamaCVEVulnerability Intelligence
/
csrf-protection

CVE-2023-27495

Bypass of CSRF protection in the presence of predictable userInfo in @fastify/csrf-protection

Texto original en inglés · Ver en español

Parche disponiblecross-site request forgery (CSRF)
Descargar PNG JSON
CVSS 3.1
5.3
Media
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N Fuente: CNA
ExplotaciónSin evidenciaSSVC: ninguna · no figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche2 versionesPrimer parche el mismo día de la divulgación
Exposición1.311 dDesde la divulgación, 20 abr 2023, 12:05 p. m.
Detección1.306 dDesde la divulgación hasta su ingreso al índice
Decisión SSVCSeguir
Remediar en la ventana regular de mantenimiento
Sin explotación conocida, no automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Revisa, agenda, parchea. El clásico de siempre.Si haces parches mensuales, ya estás cubierto.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Evaluación SSVC +1
Explotación
Remediación
Parche 4.1.0 +1
Monitoreo
Detectada
20 abr 23
5 feb 25
17 nov 26
21 nov 26
20 abr 23
13 mar 24
4 feb 25
29 dic 25
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada CVE-2023-27495 divulgada · CVSS 5.3 (CNA)
Remediación Parche 4.1.0 @fastify/csrf-protection · 0 d desde divulgación
Remediación Parche 6.3.0 @fastify/csrf-protection · 0 d desde divulgación
Divulgación Evaluación SSVC CISA-ADP · explotación ninguna
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen

@fastify/csrf-protection is a plugin which helps protect Fastify servers against CSRF attacks. The CSRF protection enforced by the @fastify/csrf-protection library in combination with @fastify/cookie can be bypassed from network and same-site attackers under certain conditions. @fastify/csrf-protection supports an optional userInfo parameter that binds the CSRF token to the user. This parameter has been introduced to prevent cookie-tossing attacks as a fix for CVE-2021-29624. Whenever userInfo parameter is missing, or its value can be predicted for the target user account, network and same-site attackers can 1. fixate a _csrf cookie in the victim's browser, and 2. forge CSRF tokens that are valid for the victim's session. This allows attackers to bypass the CSRF protection mechanism. As a fix, @fastify/csrf-protection starting from version 6.3.0 (and v4.1.0) includes a server-defined secret hmacKey that cryptographically binds the CSRF token to the value of the _csrf cookie and the userInfo parameter, making tokens non-spoofable by attackers. This protection is effective as long as the userInfo parameter is unique for each user. This is patched in versions 6.3.0 and v4.1.0. Users are advised to upgrade. Users unable to upgrade may use a random, non-predictable userInfo parameter for each user as a mitigation.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · CNA
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:H
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:R
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:N
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
5.9/ 10Medio
Vector 5.9 (moderada) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
csrf-protection · @fastify/csrf-protection< 4.1.0
csrf-protection · @fastify/csrf-protection≥ 5.0.0 < 6.3.0
4.1.0
5.0.0
6.3.0
8.0.2
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npm@fastify/csrf-protection
Corregida 4.1.0, 6.3.0 0 d · 0 d 8.0.2 no afectada
Versiones corregidas4.1.06.3.0
Explotación

Arsenal público

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

Referencias
Fabricantehttps://github.com/fastify/csrf-protection/security/advisories/GHSA-qrgf-9gpc-vrxw
Otrahttps://github.com/fastify/csrf-protection/commit/be3e5761f37aa05c7c1ac8ed44499c51ecec8058
Otrahttps://www.cvedetails.com/cve/CVE-2021-29624

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