Fastify published its advisory on 20 November 2026 and identifies versions 4.0.5 through 4.0.9 as affected. The issue concerns applications that use path-scoped Express middleware to protect a Fastify route with a matching dynamic pattern.The vendor rates the issue Critical. NVD records a CVSS 3.1 score of 9.1, with high confidentiality and integrity impact. The consequence depends on what the application selects when a route parameter or wildcard has an empty value.
What it allows
How Does CVE-2026-124626 Bypass Authentication?
The vendor says @fastify/express uses path-to-regexp to match path-scoped Express middleware. That matcher requires a dynamic segment to contain a value. Fastify's find-my-way router can accept an empty parameter or wildcard value, so the router and middleware can disagree about one request.
When both registrations share a dynamic pattern, the route handler can run while its scoped authentication middleware is skipped. An unauthenticated request may then reach a handler the application intended to protect. The vendor says the default router configuration is sufficient; the impact still depends on application behavior with an empty value.
Our defensive reading is to inspect authorization where it is enforced, not merely the route declaration. Teams can use Vulnerability Intelligence to prioritize affected deployments alongside their exposure and business context. This CVE is distinct from the earlier Fastify Express middleware bypass CVE-2026-112362.
What Does the Exploitation Record Show?
CISA's KEV catalog version 2026.11.20 does not list CVE-2026-124626. That dated catalog status does not establish whether exploitation has occurred. NVD's network attack vector and the vendor's bypass description support prioritizing reachable, affected applications.
Fastify's later CVE-2026-135279 Router middleware bypass profile covers a separate path inside mounted Express Routers and requires @fastify/express 4.0.14 or later.Who is affected
Version Check
| Release Line | Affected Range | Fixed In |
|---|---|---|
| 4.x | 4.0.5 to before 4.0.10 | 4.0.10 |
For distribution packages and custom builds, check the supplier’s advisory.
Confirm the installed and running plugin versions; application exposure also depends on matching dynamic route and middleware mounts.
Which @fastify/express Versions Are Affected?
Fastify lists @fastify/express versions from 4.0.5 inclusive to 4.0.10 exclusive. Its fixed version is 4.0.10. The exposed pattern is a Fastify route and path-scoped Express middleware mounted on matching dynamic paths, especially when that middleware enforces authentication.
Inventory the deployed plugin version and identify routes relying on dynamic middleware mounts. Check whether protected handlers can receive an empty parameter or wildcard value. This review is an application-specific defensive test, since the vendor says the practical effect depends on the value selected.
How Should Teams Fix and Verify the Issue?
Upgrade @fastify/express to 4.0.10 or later, then confirm the running deployment loads the patched version. Recheck representative protected routes for authorized and unauthenticated requests, including an empty dynamic value. Record this verification in the patch management process.
Where an immediate upgrade is unavailable, Fastify recommends enforcing authentication in a Fastify hook after route resolution. The advisory also permits mounting middleware on a static parent path. Treat either workaround as temporary and verify its behavior in the actual application before relying on it.
Timeline
-
2026-11-20
Fastify published GHSA-662w-h4p6-jq4p and identified @fastify/express 4.0.10 as the patched release.
-
2026-11-21
NVD published the CVE-2026-124626 record with a CVSS 3.1 score of 9.1.
What to do
-
Find affected plugin versions
Inventory applications using @fastify/express 4.0.5 through 4.0.9 and identify dynamic path-scoped middleware that performs authentication.
-
Apply the vendor fix
Upgrade @fastify/express to 4.0.10 or later. Prioritize reachable applications that rely on matching dynamic route and middleware patterns.
-
Verify the running version and protection
Confirm the deployed process loads 4.0.10 or later. Test authorized and unauthenticated access to protected routes, including empty dynamic values.
-
Use a temporary workaround if needed
Fastify recommends authentication in a post-routing hook or a static parent middleware mount. Validate the chosen control in the application before treating it as protective.
What Brandefense can do
- Watch your stack for exploited flaws
Name the vendors and products you run, and Brandefense alerts you when a CVE in them is exploited.
- See CVE-2026-124626 in Brandefense Atlas
The Atlas record of CVE-2026-124626: severity, exploitation status and the sources behind it.
- Vulnerability intelligence platform
Brandefense Vulnerability Intelligence follows which vulnerabilities attackers are using, so your team can patch what is under attack first.
Frequently Asked Questions
What causes CVE-2026-124626?
The Express middleware matcher requires a nonempty dynamic segment, while Fastify's router accepts an empty value. A matching route can execute without its path-scoped authentication middleware.
Which versions need the Fastify Express update?
Fastify identifies @fastify/express 4.0.5 through 4.0.9 as affected and 4.0.10 as fixed. Check both the installed dependency and the version running in production.
Does every Fastify application have the same impact?
The vendor ties the bypass to matching dynamic route and middleware mounts. The practical impact depends on what the application selects for an empty parameter or wildcard.
What can teams do before updating?
Fastify recommends placing authentication in a hook that runs after routing, or mounting middleware on a static parent path. Verify the workaround in the application.