CVE-2026-6556 Details
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.
A vulnerability exists in @fastify/express versions through 4.0.6, allowing middleware bypass in prefixed plugins. The issue arises because the plugin prefix is only applied to string mount paths. When non-string paths, such as arrays or regular expressions, are used, the middleware does not match the actual request path within the prefixed scope. This can lead to the unintentional bypass of authentication, authorization, rate limiting, or auditing middleware on protected routes.
Users can upgrade to @fastify/express version 4.0.7 to address this vulnerability. Alternatively, use string mount paths instead of arrays or regular expressions in prefixed plugins, or register one 'use' call per path.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jun 30, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://cna.openjsf.org/security-advisories.html | openjs | Vendor Advisory |
| https://github.com/fastify/fastify-express/security/advisories/GHSA-3wf5-7852-vcfq | openjs | MitigationVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-285 | Improper Authorization | openjs |
Affected Products
| Product | Versions |
|---|---|
| fastify fastify/express | < 4.0.7 |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 1, 2026 | Initial Analysis | [email protected] |
| Jun 30, 2026 | CVE Modified | CISA-ADP |
| Jun 30, 2026 | New CVE Received | openjs |