Nest has a Fastify URL Encoding Middleware Bypass
Impact
What kind of vulnerability is it? Who is impacted?
A NestJS application using @nestjs/platform-fastify can allow bypass of any middleware when Fastify path-normalization options (e.g., ignoreTrailingSlash, ignoreDuplicateSlashes, useSemicolonDelimiter) are enabled. In affected route-scoped middleware setups, variant paths may skip middleware checks while still reaching the protected handler.
The bug is a path canonicalization mismatch between middleware matching and route matching in Nest’s Fastify adapter.
Nest passes Fastify routerOptions (such as ignoreTrailingSlash, ignoreDuplicateSlashes, useSemicolonDelimiter) to the Fastify router in packages/platform-fastify/adapters/fastify-adapter.ts:253.
But middleware execution is decided by a separate regex check over req.originalUrl in packages/platform-fastify/adapters/fastify-adapter.ts:706 and packages/platform-fastify/adapters/fastify-adapter.ts:713.
If that regex does not match, Nest does next() and skips the middleware (packages/platform-fastify/adapters/fastify-adapter.ts:714), while Fastify may still normalize the same path and route it to the protected handler. So the vulnerability exists because security checks (middleware) and request dispatch(router) use different URL interpretations.
This is a fail-open design issue (inconsistent normalization), not just a bad app config: non-default router options make the mismatch reachable.
Patches
Fixed in @nestjs/platform-fastify@11.1.14
References
Credit goes to Fluidattacks (Cristian Vargas) https://fluidattacks.com/advisories/neton
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Paquete de npm | @nestjs/platform-fastify | < 11.1.14 | 11.1.14 |
Referencias
- https://github.com/nestjs/nest/security/advisories/GHSA-r4wm-x892-vjmx
- https://nvd.nist.gov/vuln/detail/CVE-2026-2293
- https://github.com/nestjs/nest/commit/fd8d073e0e048b185147209338ca7042e52c10ba
- https://fluidattacks.com/advisories/neton
- https://github.com/nestjs/nest
- https://github.com/nestjs/nest/releases/tag/v11.1.14
- Vector CVSS
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N- Debilidad (CWE)
CWE-863- Plataforma
- npm
- Paquete
@nestjs/platform-fastify- Publicada
- 02.03.2026
- Actualizado
- 11.10.2026 10:22
Fuentes y licencias
OSV / GitHub Advisory Database - GHSA-r4wm-x892-vjmx - CC BY 4.0
Historial de vulnerabilidades: @nestjs/platform-fastify
Todas las vulnerabilidades publicadas de este paquete (Paquete de npm), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
- Entradas en total
- 5
- Primera → última
- 12.2025 09.2026
- Sin corrección
- 0
- Explotada en ataques
- 0
Distribución por gravedad
- Alta 4
- Media 1
Divulgaciones por año
- 2025: 1
- 2026: 4
-
Nest has a Fastify URL Encoding Middleware Bypass esta entrada
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.