NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

CVE-2026-54281: Nest: Middleware Bypass on Fastify via Trailing Slash

highCVSS 4.0 8.7GHSA-6v32-fjc9-9qf6

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.

Published Jun 15, 2026 · Updated Jul 18, 2026

Affected packages

@nestjs/platform-fastify

Ecosystem
npm
Affected
<= 11.1.23
Fixed in
11.1.24
Check
npm ls @nestjs/platform-fastify

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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

Credited to a-tt-om, kamilmysliwiec.

References

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 entries