CVE-2026-2293: 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.
Published Mar 2, 2026
Affected packages
@nestjs/platform-fastify
- Ecosystem
- npm
- Affected
- <= 11.1.13
- Fixed in
- 11.1.14
- Check
npm ls @nestjs/platform-fastify
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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/[email protected]
References
Credit goes to Fluidattacks (Cristian Vargas) https://fluidattacks.com/advisories/neton
References
- 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/releases/tag/v11.1.14
- https://github.com/advisories/GHSA-r4wm-x892-vjmx
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesGHSA-9c5c-9qcx-q35q
@nestjs/platform-fastify: Path-scoped middleware bypass via absolute-form request targets
high7.4Sep 30, 2026CVE-2026-54281
Nest: Middleware Bypass on Fastify via Trailing Slash
high8.7Jun 15, 2026CVE-2026-33011
Nest Fastify HEAD Request Middleware Bypass
high8.7Mar 17, 2026CVE-2025-69211
Nest has a Fastify URL Encoding Middleware Bypass (TOCTOU)
medium6.9Dec 30, 2025
