CVE-2026-6556: @fastify/express vulnerable to middleware bypass via non-string mount paths in prefixed plugins

Published Jun 30, 2026
·
Updated

@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.

Affected Software

2 affected components
npm/@fastify/express<=4.0.6
fastify Fastify\/express Node.js<4.0.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade @fastify/express to a version that resolves this vulnerability.

    Fixed in 4.0.7
  2. Configuration

    In prefixed plugin scopes, avoid non-string mount paths (arrays of paths and regular expressions). Use string mount paths so the plugin prefix rewrite is applied and middleware cannot be bypassed.

    @fastify/express prefixed plugins middleware mount path type = string (avoid arrays/regular expressions)

Event History

Jun 30, 2026
CVE Published
via MITRE·12:48 PM
Data Sourced
via MITRE·12:48 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·01:19 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-6556?

CVE-2026-6556 has a critical severity score of 9.1.

2

How do I fix CVE-2026-6556?

To fix CVE-2026-6556, upgrade to @fastify/express version 4.0.7 or later.

3

What vulnerabilities are associated with CVE-2026-6556?

CVE-2026-6556 is associated with middleware bypass vulnerabilities due to non-string mount paths in prefixed plugins.

4

Which versions of @fastify/express are affected by CVE-2026-6556?

@fastify/express versions 4.0.6 and earlier are affected by CVE-2026-6556.

5

What impact does CVE-2026-6556 have on application security?

CVE-2026-6556 allows for potential unauthorized access or manipulation of middleware due to improper path handling.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203