CVE-2026-54281 Nest: Middleware Bypass on Fastify via Trailing Slash
Attackers can bypass authentication middleware in NestJS Fastify applications by appending a trailing slash to URLs, allowing unauthorized access to protected routes.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-54281?
CVE-2026-54281 is a high-severity authentication bypass vulnerability in nestjs nest, published on 22 Jun 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
Nest is a framework for building scalable Node.js server-side applications. Prior to 11.1.24, an authentication bypass vulnerability exists in @nestjs/platform-fastify. 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. This vulnerability is fixed in 11.1.24.
Weakness: CWE-863
Which versions are affected by CVE-2026-54281?
2 open source packages ship an affected version, including @nestjs/platform-fastify.
| Package | Affected | Fixed in |
|---|---|---|
@nestjs/platform-fastify npm | All versions | 11.1.24 |
@nestjs/platform-fastify npm | All versions | 11.1.24 |
How do I fix CVE-2026-54281?
Upgrade @nestjs/platform-fastify to 11.1.24 or later.
Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.
Is CVE-2026-54281 being exploited?
There is no known exploitation of CVE-2026-54281 in the wild and no public exploit code.
Sources
Also known as GHSA-6v32-fjc9-9qf6.