Advisory

GHSA-6v32-fjc9-9qf6

Also known as: CVE-2026-54281

Summary

Nest: Middleware Bypass on Fastify via Trailing Slash

Details

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

Severity

High Basis: The source's own band: HIGH

Dates

Published
2026-06-15 20:36 UTC
Modified
2026-07-18 17:30 UTC

Affected packages and fixes

@nestjs/platform-fastify

npm · All systems

Affected

  • introduced 0, fixed 11.1.24 (semver)

Fixed versions

11.1.24

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences