CVE-2026-6556 @fastify/express vulnerable to middleware bypass via non-string mount paths in prefixed plugins
Attackers can bypass path-scoped middleware like authentication in prefixed Fastify plugins by using non-string mount paths.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-6556?
CVE-2026-6556 is a critical missing authorization vulnerability in @fastify/express, published on 30 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
@fastify/express versions 4.0.6 and earlier only rewrite the plugin prefix for middleware mount paths when the path argument is a string. Non-string mount paths (arrays of paths and regular expressions) are left unprefixed inside prefixed plugin scopes, so middleware registered with those forms does not match the actual prefixed request path. Applications that use path-scoped middleware for authentication, authorization, rate limiting, or auditing on routes inside a prefixed scope can be bypassed by sending a request to the prefixed route, because Fastify still matches the route but the middleware is skipped. Patches: upgrade to @fastify/express 4.0.7. Workarounds: use string mount paths instead of arrays or regular expressions in prefixed plugins, or register one use call per path.
Weakness: CWE-285
Which versions are affected by CVE-2026-6556?
It affects 1 product.
Products include Fastify Fastify\/Express.
How do I fix CVE-2026-6556?
No fix has been published for CVE-2026-6556 yet. Limit exposure of the affected software until one is available.
Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.
Is CVE-2026-6556 being exploited?
There is no known exploitation of CVE-2026-6556 in the wild and no public exploit code.
Other vulnerabilities in @fastify/express
Sources
Also known as GHSA-3wf5-7852-vcfq.