NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

CVE-2026-2880: @fastify/middie has Improper Path Normalization when Using Path-Scoped Middleware

highCVSS 4.0 8.2GHSA-8p85-9qpw-fwgw

Summary A path normalization inconsistency in @fastify/middie can result in authentication/authorization bypass when using path-scoped middleware (for example, app.use('/secret', auth)). When Fastify router normalization options are enabled (such as ignoreDuplicateSlashes, useSemicolonDelimiter, and related trailing-slash behavior), crafted request paths may bypass middleware checks while still being routed to…

Published Feb 28, 2026 · Updated Mar 7, 2026

Affected packages

@fastify/middie

Ecosystem
npm
Affected
< 9.2.0
Fixed in
9.2.0
Check
npm ls @fastify/middie

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

Summary

A path normalization inconsistency in @fastify/middie can result in authentication/authorization bypass when using path-scoped middleware (for example, app.use('/secret', auth)).

When Fastify router normalization options are enabled (such as ignoreDuplicateSlashes, useSemicolonDelimiter, and related trailing-slash behavior), crafted request paths may bypass middleware checks while still being routed to protected handlers.

Impact

An unauthenticated remote attacker can access endpoints intended to be protected by middleware-based auth/authorization controls by sending specially crafted URL paths (for example, //secret or /secret;foo=bar), depending on router option configuration.

This may lead to unauthorized access to protected functionality and data exposure.

Affected versions

  • Confirmed affected: @fastify/[email protected]
  • All versions prior to the patch are affected.

Patched versions

  • Fixed in: *9.2.0*

Details

The issue is caused by canonicalization drift between:

  1. @fastify/middie path matching for app.use('/prefix', ...), and
  2. Fastify/find-my-way route lookup normalization.

Because middleware and router did not always evaluate the same normalized path, auth middleware could be skipped while route resolution still succeeded.

Workarounds

Until patched version is deployed:

  • Avoid relying solely on path-scoped middie guards for auth/authorization.
  • Enforce auth at route-level handlers/hooks after router normalization.
  • Disable risky normalization combinations only if operationally feasible.

Resources

  • Fluid Attacks Disclosure Policy: https://fluidattacks.com/advisories/policy
  • Fluid Attacks advisory URL: https://fluidattacks.com/advisories/jimenez

Credits

  • Cristian Vargas (Fluid Attacks Research Team) — discovery and report.
  • Oscar Uribe (Fluid Attacks) — coordination and disclosure.

Credited to tachote, mcollina, UlisesGascon, Eomm.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More npm vulnerabilities

All npm entries