CVE-2026-6556
published critical CVSS 3.1 · 9.1@fastify/express vulnerable to middleware bypass via non-string mount paths in prefixed plugins
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| @fastify/express | — | @fastify/express0 to < 4.0.7 (affected · semver) · 4.0.7 (unaffected · semver) · Other versions: unaffected | Version-specific | Not stated | openjs |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 9.1 / 10
- Severity
- critical
- Provider
- openjs · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| @fastify/express | @fastify/express | 0 to < 4.0.7 (affected · semver)4.0.7 (unaffected · semver)Default: unaffected | openjs · cna |
Weaknesses
1- CWE-285 CWE-285: Improper Authorization
References
2Provider assertions
2openjs · cna
@fastify/express vulnerable to middleware bypass via non-string mount paths in prefixed plugins
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 98a1afa11c392ac7a43ded6e1c32f40846a68192f70fac82c4c7920fea873ea5
- Ingested
- 23 Sep 2026, 09:28:24 UTC
- Source record
- Official CVE record