Summary
CVE-2026-124626 is a path-scoped middleware bypass in @fastify/express, the compatibility layer that lets Express middleware run inside Fastify. It was published to NVD on November 21, 2026 with a CVSS score of 9.1.
Details
In versions 4.0.5 through 4.0.9, the plugin matches path-scoped Express middleware with a matcher that requires a non-empty value for a dynamic segment. Fastify's router accepts an empty value, so a request with an empty route parameter or a wildcard can reach the route handler while the middleware mounted on that path is skipped. If that middleware performs authentication, authorization or rate limiting, an unauthenticated attacker can get past it.
| Item | Detail |
|---|---|
| CVE | CVE-2026-124626 |
| Advisory | GHSA-662w-h4p6-jq4p |
| CVSS | 9.1 (critical) |
| Package | @fastify/express |
| Affected | 4.0.5 through 4.0.9 |
| Fixed | 4.0.10 |
| Exploitation | Not confirmed in the sources reviewed |
This is one of five path-scoped bypasses fixed in 4.0.10. The others are CVE-2026-129504, CVE-2026-133120, CVE-2026-133867 and CVE-2026-129850 (rated high). A related flaw in the separate @fastify/middie package is covered in CVE-2026-133250.
Recommended actions
- Upgrade with
npm install @fastify/express@^4.0.10. - Find apps that mount auth or access-control middleware on a path with
@fastify/expressand treat them as exposed until updated. - Do not rely on path-scoped Express middleware as the only access control. Add checks inside the route handler or in a Fastify
onRequesthook. - Review access logs for requests with empty path segments or wildcards against protected routes.