GHSA-8p85-9qpw-fwgw
GHSA-8p85-9qpw-fwgw is a Improper Input Validation vulnerability in @fastify/middie. O3 Security confirms whether GHSA-8p85-9qpw-fwgw is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
@fastify/middie has Improper Path Normalization when Using Path-Scoped Middleware
Blast Radius
@fastify/middieReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.
Description
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:
@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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @fastify/middie | all versions | 9.2.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @fastify/middie. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update @fastify/middie to 9.2.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-8p85-9qpw-fwgw is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-8p85-9qpw-fwgw is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-8p85-9qpw-fwgw. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-8p85-9qpw-fwgw in your dependencies?
O3 detects GHSA-8p85-9qpw-fwgw across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.