Fastify middleware bypass advisories published on November 20, 2026 call for separate upgrades: @fastify/express 4.0.10 and @fastify/middie 9.3.8. Applications that use path-scoped middleware for authentication, authorization, or rate limiting need a route-by-route check after updating.
The Fastify team describes several different path interpretation errors, not one universal request trick. The practical risk is that Fastify dispatches a protected handler while a middleware matcher skips the check that should run before it.
Fastify Middleware Bypass: Which Packages and Routes Come First?
Start with the deployed dependency tree, including lockfiles and containers; the Vulnerability Intelligence module helps prioritize the broader patch queue. Run npm ls @fastify/express @fastify/middie in each application and record the installed versions, then compare them with the maintainer’s patched versions.
| Package | Patched version | Where to prioritize review |
|---|---|---|
| @fastify/express | 4.0.10 or later | Path-scoped authentication or rate limiting, especially prefixed plugins and dynamic or RegExp mounts. |
| @fastify/middie | 9.3.8 or later | Path-scoped middleware over handlers with parameters, wildcards, or literal percent characters. |
Patch both packages if both appear in the deployed application. A change to one plugin does not establish that the other plugin’s middleware matches the route Fastify actually serves.
Step 1: Inventory Every Security-Critical Middleware Mount
Search application registration code for use() calls and identify mounts guarding privileged routes. Include authentication, authorization, audit, and rate-limit middleware, then note each plugin prefix and the corresponding Fastify route.
Pay particular attention to Express mounts joined to prefixes. Fastify’s prefix and mount advisory says a trailing slash in a plugin prefix or missing leading slash in the mount can silently skip middleware without a crafted request.
Also flag RegExp mounts under parameterized prefixes and dynamic mounts where an empty route value might be accepted. Those are separate Express cases with their own preconditions, even though 4.0.10 fixes both.
Step 2: Upgrade and Confirm the Running Version
Update the declared dependencies and lockfile, rebuild the deployment artifact, and confirm the versions inside the running image. Review each service independently because a monorepo may contain more than one lockfile or deployable application.
Fastify’s November 20 advisories name 4.0.10 as the Express fix and 9.3.8 as the middie fix. Record the package version alongside the service name and deployment time so a later investigation can distinguish source updates from deployed updates.
- InventoryIdentify running versions and every protected use() mount.
- UpgradeDeploy Express 4.0.10 and middie 9.3.8 wherever used.
- VerifyConfirm protected handlers require the expected middleware decision after deployment.
- ReviewInspect pre-patch access records for unexpected handler success without the expected auth event.
Step 3: Test the Boundary Between Routing and Authorization
In a safe test environment, exercise each protected route through normal requests and boundary conditions described by the advisories. Assert that the authentication or authorization hook executes before the handler and that unauthorized calls cannot reach application data.
Do not treat a successful ordinary-path test as sufficient. The middie advisory identifies empty parameter or wildcard values, unusual request targets, and percent handling as separate mismatches.
The Express URL interpretation advisory covers decoding and normalization differences. A separate case-folding advisory applies only when case-insensitive routing is enabled and a protected mount contains the affected character.
For Express, empty route parameters or wildcards affect matching between the router and the middleware matcher. RegExp mounts under parameterized prefixes create another mismatch, so the test matrix must reflect the application’s actual registration patterns.
Step 4: Review Access Records and Choose a Temporary Control
Compare request logs with middleware authentication and authorization events for the protected handlers identified above. Investigate a handler success without its expected security decision, while accounting for logging gaps before concluding that a bypass occurred.
Where an update needs coordination, the maintainers recommend enforcing authentication in a Fastify preHandler hook after route resolution. Base that decision on the matched route rather than the raw request URL; keep the control until the patched build is deployed and verified.
Brandefense Blackhole recorded 89 Fastify-related dark-chat posts from August 23 through November 21, 2026. This is a count of matching discussion posts, not a count of these CVEs, affected services, or confirmed exploitation.
Why This Order Matters
Inventory comes first because only applications using these plugins and path-scoped security middleware face the described path mismatch. Patching removes the known plugin defects, while route tests check whether each application’s protection still executes in the deployed build.
Log review follows the route map because a request alone does not show whether middleware was skipped. Teams comparing this incident with earlier Fastify work can read our earlier Express middleware bypass profile and Fastify proxy path escape analysis; those cover different flaws.
Our vulnerability management guide provides a broader framework for recording ownership, deployment evidence, and retesting. The maintainer advisories remain the source for the affected packages and fixed versions in this playbook.
The six maintainer advisories used here report CVSS 3.1 scores, including 9.1 for five of the six issues and 7.4 for the conditional case-folding issue. They do not provide a CVSS 4.0 score, and the scores do not replace a check of each application’s configuration.
Frequently Asked Questions
Which Fastify plugin versions fix the middleware bypasses?
The Fastify advisories specify @fastify/express 4.0.10 and @fastify/middie 9.3.8 as the patched versions. Confirm what is running in every deployed service.
Is a package upgrade enough to close this issue?
Upgrade both affected plugins where used, then verify that security middleware executes on each protected route in the deployed build.
What can teams do while deploying a patched build?
The maintainers recommend a Fastify preHandler hook that enforces authentication after route resolution and bases the decision on the matched route.
