CVE-2026-2880: @fastify/middie Improper Path Normalization Vulnerability

@fastify/middie Updated 28 Feb 2026

Summary

28/02/2026
Yes i
High
8.2

CVE-2026-2880: @fastify/middie has Improper Path Normalization when Using Path-Scoped Middleware. Affects @fastify/middie versions < 9.2.0. Fixed in 9.2.0. 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 @fastify/middie package is a middleware for the Fastify web framework, designed to facilitate the integration of middleware functions into Fastify applications. It allows developers to use traditional middleware patterns, enhancing the flexibility and functionality of Fastify applications. However, a recent vulnerability has been identified that compromises the security of applications using this package, particularly in scenarios where path-scoped middleware is employed.

Vulnerability Detail

A path normalization inconsistency in @fastify/middie can lead to authentication and authorization bypass when using path-scoped middleware. This issue arises when Fastify router normalization options are enabled, allowing crafted request paths to bypass middleware checks while still being routed to protected handlers. An unauthenticated remote attacker could exploit this vulnerability to access endpoints that should be protected by middleware-based authentication and authorization controls, potentially leading to unauthorized access to sensitive functionality and data exposure.

How To Fix

Minimum fixed version

9.2.0

This is the first release that contains the fix.

npm install @fastify/middie@9.2.0

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

Workaround

Until the patched version is deployed, consider implementing the following workarounds: 1. Avoid relying solely on path-scoped middie guards for authentication and authorization. 2. Enforce authentication at route-level handlers or hooks after router normalization. 3. Disable risky normalization combinations if operationally feasible.

Conclusion

The @fastify/middie package has a significant vulnerability (CVE-2026-2880) that could allow unauthorized access to protected endpoints. It is crucial to update to version 9.2.0 or later to mitigate this risk. Until then, implementing the suggested workarounds can help protect your application.

See every vulnerability recorded for @fastify/middie →

Share this vulnerability

FAQ

CVE-2026-2880 is a vulnerability in the @fastify/middie package that allows for authentication and authorization bypass due to improper path normalization.

All versions prior to 9.2.0 are affected by this vulnerability.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

The CVSS score of this vulnerability is 8.2, indicating a high severity level.

If you cannot update the package immediately, implement the suggested workarounds to mitigate the risk until you can apply the patch.

Related vulnerabilities

Recent vulnerabilities recorded for @fastify/middie.

How To Fix

Minimum fixed version

9.2.0

This is the first release that contains the fix.

npm install @fastify/middie@9.2.0

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