llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · @fastify/middie

GHSA-GCF6-J9M3-P97X

@fastify/middie vulnerable to path-scoped middleware bypass via request path matching mismatches

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

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
9.1
Crítica
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición1 dDesde la divulgación, 20 nov 2026, 1:14 p. m.
Detección15 minDesde la divulgación hasta su ingreso al índice
Decisión estimadaAtender
Priorizar en el próximo ciclo de cambios
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, automatizable e impacto técnico total. No hay versión corregida: aplique mitigaciones.
Si la dejas para después, después te va a doler.Me tiemblan las patas. Tú encárgate del parche.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
01:14 p. m.
04:44 p. m.
01:14 p. m.
08:06 p. m.
02:59 a. m.
09:51 a. m.
04:44 p. m.
FechaFaseEventoDetalle
Divulgación Publicada GHSA-GCF6-J9M3-P97X divulgada · CVSS 9.1 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Impact

`@fastify/middie` matches path-scoped middleware against its own reading of the request path, which can differ from the path Fastify's router (find-my-way) uses to dispatch. When the two disagree, the router routes a request to a handler that a middleware mount covers while middie skips that middleware, so an unauthenticated client reaches a handler that an authentication, authorization or rate-limiting middleware was meant to protect. No special configuration is required.

Three request forms trigger the mismatch. An empty parameter or wildcard value matches in find-my-way but not in middie's path-to-regexp mount, which needs at least one character, so `/tenant//admin` reaches a `/tenant/:id/admin` mount with `id` empty, `/user/` reaches `/user/:id`, and `/files/` reaches `/files/*path`; multiple parameters in one segment and plugin prefixes behave the same way. A request target that starts with `*`, such as `*admin`, is routed to `/admin` by find-my-way, which skips the first character of the path, while middie matches the target as sent. And a literal `%` in a mount path is kept encoded as `%25` by find-my-way but decoded once more by middie, so `/100%25` reaches a `/100%` mount that middie skips. All releases up to 9.3.7 are affected.

Patches

Upgrade to `@fastify/middie` 9.3.8 or later. middie now matches middleware against the path find-my-way routes: empty parameter and wildcard values are allowed, request targets that do not start with `/` other than the asterisk-form are rejected, and a literal `%` in a mount path is matched as the router keeps it encoded.

Workarounds

Enforce authentication in a Fastify hook (such as `preHandler`) that runs after the router has resolved the request, and base the decision on the matched route (`request.routeOptions.url`) rather than `request.url`. This covers all three vectors.

References
  • delvedor/find-my-way#471 https://github.com/delvedor/find-my-way/pull/471, which stops find-my-way from routing a path that does not start with `/`.
  • GHSA-hx87-8wv7-pjv8 https://github.com/fastify/middie/security/advisories/GHSA-hx87-8wv7-pjv8, a middleware bypass of the same kind via absolute-form request targets.
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:L
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
10.0/ 10Muy alto
Vector 10.0 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
@fastify/middie< 9.3.8
9.3.6
9.3.8
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npm@fastify/middie
Sin parche — — 9.3.6 afectada
Versiones corregidas9.3.8
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/fastify/middie/security/advisories/GHSA-gcf6-j9m3-p97x

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