GitHub Advisoryadvisory · npm

GHSA-6v32-fjc9-9qf6 Nest: Middleware Bypass on Fastify via Trailing Slash

HIGH Published 2026-06-15 Modified 2026-07-18 Official page ↗
Aliases
CVE-2026-54281
Ecosystem
npm
Packages
@nestjs/platform-fastify
Severity
High
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N
Weaknesses
CWE-863
Reviewed
2026-06-15

Affected packages

• npm @nestjs/platform-fastify: < 11.1.24 → fixed in 11.1.24

Description

Impact An authentication bypass vulnerability exists in `@nestjs/platform-fastify` (confirmed on version `11.1.24`, the latest available release at time of report). When middleware is registered through NestJS's `MiddlewareConsumer.forRoutes()` API on the Fastify adapter, an unauthenticated client can bypass the Nest middleware registered for that route by simply appending a trailing slash (`/`) to the request URL. This bypass works on the default Fastify adapter configuration — no special router options need to be enabled. Applications using the standard CRUD route shape (`GET /resource` and `GET /resource/:id`) are affected when they protect those routes with `MiddlewareConsumer.forRoutes()` middleware. Patches Fixed in `@nestjs/[email protected]` References Kudos goes to @a-tt-om

Related

Alias · CVE (1)

  • CVE-2026-54281 Nest is a framework for building scalable Node.js server-side applications. vulnerability

Weakness · CWE (1)

  • CWE-863 Incorrect Authorization weakness

References