CVE-2023-27495Fastify Csrf-protection
Media 6.5 Sin autenticación
Seguir: esta CVE · Fastify · Fastify Csrf-protection Te avisamos por email o Slack (requiere cuenta).
- Prioridad
- 54
- CVSS 3.1
- 6.5
- EPSS
- 0.4% probabilidad de explotación en 30 días · percentil 25
- Requiere autenticación
- No
- Publicada
- 20 abr 2023
- Actualizada
- 17 jun 2026
- Categoría
- Aplicación · Multiplataforma
- Debilidad (CWE)
- CWE-352
- SSVC (CISA)
- Explotación: ninguna · Automatizable: no · Impacto técnico: parcial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
Qué pasa
@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.
Qué hacer
- Aplica la actualización de seguridad del fabricante para Csrf-protection.
- 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 | @fastify/csrf-protection |
< 4.1.0 |
4.1.0 |
npm install @fastify/csrf-protection@4.1.0 |
| npm | @fastify/csrf-protection |
≥ 5.0.0 < 6.3.0 |
6.3.0 |
npm install @fastify/csrf-protection@6.3.0 |
Según OSV / GitHub Advisories (GHSA-qrgf-9gpc-vrxw). Verifica la versión en tu lockfile antes de actualizar.
Productos afectados (CPE)
| Fabricante | Producto | Versiones |
|---|---|---|
| fastify | csrf-protection | < 4.1.0 |
| fastify | csrf-protection | ≥ 5.0.0 < 6.3.0 |
Fuentes oficiales
Referencias
Enlaces publicados por las fuentes. Ábrelos con criterio.
- github.com Patch
- github.com Vendor Advisory
- www.cvedetails.com Third Party Advisory