CVE-2026-132131
Fastify Middie auth bypass in path-scoped middleware
Remote, unauthenticated attackers can reach protected routes by skipping path-scoped middleware such as auth checks.
Texto original en inglés · Ver en español
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Fuente: CNA
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | CVE-2026-132131 divulgada · CVSS 7.4 (CNA) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Fuente: NIST NVD | Registro visto por primera vez en NIST NVD | |
| Divulgación | Evaluación SSVC | CISA-ADP · explotación ninguna | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
@fastify/middie, the middleware engine for Fastify, can let a remote, unauthenticated attacker reach protected routes. Path-scoped middleware such as authentication, authorization, or rate limiting is skipped for some subroutes when it is mounted on an array of paths that includes a path ending in a slash or the root path.
Affects @fastify/middie 8.3.0 through 9.3.6 when middleware is mounted on an array of paths where an element ends with a slash. Fixed in 9.3.7.
Descripción original del registro (openjs)
@fastify/middie is the middleware engine that adds Express and Connect style middleware support to Fastify. In versions 8.3.0 through 9.3.6, the internal helper that normalizes a path-scoped middleware's mount path only handles string inputs, but the use method also accepts an array of mount paths and passes it through unchanged, so the normalization silently does nothing. As a result, a trailing slash on an array element survives into the generated route-matching regular expression, and an element that is exactly the root path, meaning a catch-all mount, is dropped entirely. Requests to subroutes of the affected mount paths then skip the path-scoped middleware, such as authentication, authorization, or rate limiting, while Fastify's router still dispatches them to the handler, allowing an unauthenticated client to reach protected routes. Applications are affected when they mount middleware on an array of paths in which an element ends with a slash, including one introduced by a plugin prefix that ends with a slash, or is exactly the root path. The issue is fixed in @fastify/middie 9.3.7, and users should upgrade to 9.3.7 or later. As a workaround, enforce authorization in a Fastify hook such as preHandler that runs after routing, and avoid array mount paths with a trailing slash element for security relevant middleware.
Condiciones y alcance
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npm@fastify/middie |
Sin parche | — | — | 9.3.6 afectada |
9.3.7Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/fastify/middie/security/advisories/GHSA-hfwp-44m5-9364https://cna.openjsf.org/security-advisories.htmlLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
