Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-r4wm-x892-vjmx

Опубликовано: 02 мар. 2026
Источник: github
Github: Прошло ревью
CVSS4: 8.2

Описание

Nest has a Fastify URL Encoding Middleware Bypass

Impact

What kind of vulnerability is it? Who is impacted?

A NestJS application using @nestjs/platform-fastify can allow bypass of any middleware when Fastify path-normalization options (e.g., ignoreTrailingSlash, ignoreDuplicateSlashes, useSemicolonDelimiter) are enabled. In affected route-scoped middleware setups, variant paths may skip middleware checks while still reaching the protected handler.

The bug is a path canonicalization mismatch between middleware matching and route matching in Nest’s Fastify adapter.

Nest passes Fastify routerOptions (such as ignoreTrailingSlash, ignoreDuplicateSlashes, useSemicolonDelimiter) to the Fastify router in packages/platform-fastify/adapters/fastify-adapter.ts:253.

But middleware execution is decided by a separate regex check over req.originalUrl in packages/platform-fastify/adapters/fastify-adapter.ts:706 and packages/platform-fastify/adapters/fastify-adapter.ts:713.

If that regex does not match, Nest does next() and skips the middleware (packages/platform-fastify/adapters/fastify-adapter.ts:714), while Fastify may still normalize the same path and route it to the protected handler. So the vulnerability exists because security checks (middleware) and request dispatch(router) use different URL interpretations.

This is a fail-open design issue (inconsistent normalization), not just a bad app config: non-default router options make the mismatch reachable.

Patches

Fixed in @nestjs/platform-fastify@11.1.14

References

Credit goes to Fluidattacks (Cristian Vargas) https://fluidattacks.com/advisories/neton

Пакеты

Наименование

@nestjs/platform-fastify

npm
Затронутые версииВерсия исправления

<= 11.1.13

11.1.14

EPSS

Процентиль: 44%
0.00211
Низкий

8.2 High

CVSS4

Дефекты

CWE-863

Связанные уязвимости

CVSS3: 7.5
redhat
около 1 месяца назад

A NestJS application using @nestjs/platform-fastify can allow bypass of authentication/authorization middleware when Fastify path-normalization options are enabled. This issue affects nest.Js: 11.1.13.

nvd
около 1 месяца назад

A NestJS application using @nestjs/platform-fastify can allow bypass of authentication/authorization middleware when Fastify path-normalization options are enabled. This issue affects nest.Js: 11.1.13.

EPSS

Процентиль: 44%
0.00211
Низкий

8.2 High

CVSS4

Дефекты

CWE-863