CVE-2026-6556: Fastify @fastify/express middleware bypass via non-string mount paths

CVE-2026-6556 · Severity: critical · CVSS 9.1 · Published 2026-06-30

@fastify/express is a library used to integrate Express middleware into Fastify web applications. A flaw in how it handles certain path types allows security middleware—such as those for authentication or rate limiting—to be bypassed. This could allow unauthorized users to access protected data or administrative functions by sending requests that skip the intended security checks.

Technologies: Fastify Express. Vendors: Fastify.

Quick answers

Is CVE-2026-6556 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-6556 being exploited in the wild.
How severe is CVE-2026-6556?
Critical severity, with a CVSS score of 9.1, published 30 June 2026.
Which products and versions are affected?
Fastify Express <= 4.0.6.
Is there a fix for CVE-2026-6556?
A patch was published on 2026-06-30: Version 4.0.7 released Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-6556 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-6556?
Check whether you run Fastify Express at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The vulnerability is an improper authorization check (CWE-285) caused by a failure to rewrite plugin prefixes for non-string mount paths. In @fastify/express versions 4.0.6 and earlier, when middleware is registered using an array of paths or a Regular Expression within a prefixed plugin scope, the prefix is not applied to these paths. Consequently, Express fails to match the unprefixed pattern against the actual incoming request path, causing the middleware to be skipped. If this middleware is responsible for authentication, authorization, or auditing, an attacker can bypass these controls to reach the underlying route. The issue is resolved in version 4.0.7.

Affected products

  • Fastify @fastify/express <= 4.0.6

Timeline

  • 2026-06-29: advisory: GitHub Security Advisory published
  • 2026-06-30: disclosed: NVD publication date
  • 2026-06-30: patched: Version 4.0.7 released

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.