@fastify/middie has Improper Path Normalization when Using Path-Scoped Middleware
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/middie@9.1.0 - All versions prior to the patch are affected.
Patched versions
- Fixed in: 9.2.0
Details
The issue is caused by canonicalization drift between:
@fastify/middiepath matching forapp.use('/prefix', ...), and- 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.
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| npm-Paket | @fastify/middie | < 9.2.0 | 9.2.0 |
Verweise
- https://github.com/fastify/middie/security/advisories/GHSA-8p85-9qpw-fwgw
- https://nvd.nist.gov/vuln/detail/CVE-2026-2880
- https://github.com/fastify/middie/commit/140e0dd0359d890fec7e6ea1dcc5134d6bd554d4
- https://fluidattacks.com/advisories/jimenez
- https://fluidattacks.com/advisories/policy
- https://github.com/fastify/middie
- https://github.com/fastify/middie/releases/tag/v9.2.0
- CVSS-Vektor
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N- Schwäche (CWE)
CWE-20- Plattform
- npm
- Paket
@fastify/middie- Veröffentlicht
- 28.02.2026
- Aktualisiert
- 11.10.2026 10:22
Quellen und Lizenzen
OSV / GitHub Advisory Database - GHSA-8p85-9qpw-fwgw - CC BY 4.0
Schwachstellenhistorie: @fastify/middie
Alle veröffentlichten Schwachstellen dieses Pakets (npm-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
- Einträge insgesamt
- 4
- Erste → letzte
- 01.2026 04.2026
- Ohne Fix
- 0
- In Angriffen ausgenutzt
- 0
Verteilung nach Schweregrad
- Kritisch 1
- Hoch 3
Veröffentlichungen pro Jahr
- 2026: 4
-
@fastify/middie has Improper Path Normalization when Using Path-Scoped Middleware dieser Eintrag
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.