# CVE-2025-69211: NestJS Fastify URL encoding middleware bypass

Source: https://junglewise.ai/threats/cve-2025-69211-nestjs-fastify-url-encoding-middleware-bypass  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2025-12-29. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2025-69211 · Severity: high · CVSS 7.4 · Published 2025-12-29

NestJS applications using the Fastify platform adapter can be bypassed when security middleware is applied to specific routes. An attacker can use URL encoding tricks (e.g., `/%61dmin` for `/admin`) to avoid middleware checks while still accessing protected endpoints, leading to unauthorized access to authentication, authorization, and validation controls. This can allow unauthenticated users to access administrative functions or restricted resources.

Technologies: [NestJS Nest](https://junglewise.ai/threats/technologies/nest), [NestJS Platform-Fastify](https://junglewise.ai/threats/technologies/platform-fastify), [@nestjs/platform-fastify (npm)](https://junglewise.ai/threats/technologies/nestjs-platform-fastify). Vendors: [NestJS](https://junglewise.ai/threats/vendors/nestjs), [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2025-69211 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2025-69211 being exploited in the wild.

**How severe is CVE-2025-69211?** High severity, with a CVSS score of 7.4, published 29 December 2025.

**Which products and versions are affected?** NestJS Platform-Fastify < 11.1.11; @nestjs/platform-fastify (npm) SEMVER:introduced=0,fixed=11.1.11.

**Is there a fix for CVE-2025-69211?** Yes. @nestjs/platform-fastify (npm): upgrade to 11.1.11 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2025-69211 attacked?** It is attacked over the network.

**Am I affected by CVE-2025-69211?** Check whether you run NestJS Nest, NestJS Platform-Fastify or @nestjs/platform-fastify (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- @nestjs/platform-fastify (npm): upgrade to 11.1.11 or later

  ```sh
  npm install @nestjs/platform-fastify@11.1.11
  ```


## Technical details

This is a time-of-check time-of-use (TOCTOU) race condition vulnerability in NestJS's Fastify platform adapter. The root cause is inconsistent URL decoding between the middleware routing logic and the actual route handler execution. When middleware is configured to protect specific routes using string paths (e.g., `.forRoutes('admin')`), the middleware matching logic does not decode URL-encoded characters, but the subsequent controller routing does. An attacker can send requests with URL-encoded path segments (e.g., `/%61dmin` instead of `/admin`, where `%61` is the hex encoding for 'a') to bypass middleware checks while still reaching the target controller. This affects applications relying on NestMiddleware for security checks via MiddlewareConsumer or app.use(). The vulnerability is patched in @nestjs/platform-fastify version 11.1.11 and later.

## Affected products

- NestJS platform-fastify < 11.1.11

## Identifiers

- CVE-2025-69211
- GHSA-8wpr-639p-ccrj

## Timeline

- 2025-12-29: disclosed
- 2025-12-30: patched: Fixed in @nestjs/platform-fastify 11.1.11

## References

- [https://github.com/nestjs/nest/security/advisories/GHSA-8wpr-639p-ccrj](https://github.com/nestjs/nest/security/advisories/GHSA-8wpr-639p-ccrj)

## Related threats

- [NestJS denial of service via deeply nested microservice message pattern](https://junglewise.ai/threats/cve-2026-102281-nest-is-a-framework-for-building-scalable-node-js-server-side)
- [NestJS authentication bypass in @nestjs/platform-fastify via trailing slash](https://junglewise.ai/threats/cve-2026-54281-nestjs-authentication-bypass-in-nestjs-platform-fastify-via)
- [Nest Affected by DoS via Recursive handleData in JsonSocket (TCP Transport)](https://junglewise.ai/threats/cve-2026-40879-nest-affected-by-dos-via-recursive-handledata-in-jsonsocket-tcp)
- [@nestjs/core Improperly Neutralizes Special Elements in Output Used by a Downstream Component ('Injection')](https://junglewise.ai/threats/cve-2026-35515-nestjs-core-improperly-neutralizes-special-elements-in-output)
- [NestJS platform-fastify HEAD request middleware bypass](https://junglewise.ai/threats/cve-2026-33011-nestjs-platform-fastify-head-request-middleware-bypass)
