CVE-2025-69211: @nestjs/platform-fastify Fastify URL Encoding Middleware Bypass Vulnerability

@nestjs/platform-fastify Updated 30 Dec 2025

Summary

30/12/2025
Yes i
Moderate
6.9

CVE-2025-69211: Nest has a Fastify URL Encoding Middleware Bypass (TOCTOU). Affects @nestjs/platform-fastify versions < 11.1.11. Fixed in 11.1.11. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The @nestjs/platform-fastify package is a part of the NestJS framework, which is designed for building efficient and scalable server-side applications. It provides a Fastify-based platform for NestJS applications, enabling high performance and low overhead. However, this package is vulnerable to a specific issue related to URL encoding, which can lead to significant security risks if not addressed.

Vulnerability Detail

The vulnerability arises from a Time-of-Check to Time-of-Use (TOCTOU) issue in the middleware configuration. If a NestJS application uses @nestjs/platform-fastify and applies security middleware to specific routes based on string paths, it can be bypassed through URL encoding. For instance, an attacker can access the protected '/admin' route by sending a request to '/%61dmin', which circumvents the middleware checks. This can lead to unauthorized access to sensitive routes, allowing unauthenticated users to perform actions that should be restricted, such as accessing administrative endpoints or bypassing input validation.

How To Fix

Minimum fixed version

11.1.11

This is the first release that contains the fix.

npm install @nestjs/platform-fastify@11.1.11

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can avoid using path-based restrictions for middleware. Instead, consider applying middleware globally or using more robust methods for route protection that do not rely solely on string matching.

Conclusion

The CVE-2025-69211 vulnerability in the @nestjs/platform-fastify package poses significant security risks due to its URL encoding middleware bypass. It is crucial for developers to update to the patched version and consider alternative middleware application strategies to safeguard their applications.

See every vulnerability recorded for @nestjs/platform-fastify →

Share this vulnerability

FAQ

The vulnerability is a TOCTOU issue that allows attackers to bypass security middleware by using URL encoding.

If your application uses @nestjs/platform-fastify and applies middleware to specific routes based on string paths, it may be vulnerable. You can check your package-lock.json with Vulert to see if you are affected.

The consequences include unauthorized access to protected routes, potential data exposure, and the ability to perform actions without proper authentication or authorization.

Yes, the vulnerability has been patched in version 11.1.11 of @nestjs/platform-fastify. Updating to this version will resolve the issue.

You can use Vulert, which monitors your package-lock.json for open-source vulnerabilities in real-time. You can also check your application against known vulnerabilities using the Vulert playground.

Related vulnerabilities

Recent vulnerabilities recorded for @nestjs/platform-fastify.

How To Fix

Minimum fixed version

11.1.11

This is the first release that contains the fix.

npm install @nestjs/platform-fastify@11.1.11

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback