CVE-2026-54281
JSON

8.7high

Nest: Middleware Bypass on Fastify via Trailing Slash

Severity
8.7high CVSS:4.0 by GitHub_M
Exploit likelihood
0.29% (higher than 22% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-6v32-fjc9-9qf6

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.

Affected

Product or packageVersionsReported by
nestjs nest< 11.1.24CVE List
@nestjs/platform-fastify (npm)before 11.1.24GitHub Advisory Database

All scores

GitHub_M8.7high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N

Classification

CWE-863

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

GitHub Advisory Database
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/platform-fastify@11.1.24

References

Kudos goes to @a-tt-om

NVD (es)

Nest es un framework para construir aplicaciones escalables de servidor Node.js. Antes de la versión 11.1.24, existe una vulnerabilidad de omisión de autenticación en @nestjs/platform-fastify. Cuando el middleware se registra a través de la API MiddlewareConsumer.forRoutes() de NestJS en el adaptador Fastify, un cliente no autenticado puede omitir el middleware de Nest registrado para esa ruta simplemente añadiendo una barra inclinada final (/) a la URL de la solicitud. Esta omisión funciona en la configuración predeterminada del adaptador Fastify. Esta vulnerabilidad está corregida en la versión 11.1.24.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-54281 changed 2026-06-24CVE Terms of Use
GitHub Advisory DatabaseGHSA-6v32-fjc9-9qf6 changed 2026-07-18CC-BY-4.0
NVDCVE-2026-54281 changed 2026-10-25Public domain