# CVE-2026-33804: Fastify @fastify/middie middleware bypass via duplicate slashes

Source: https://junglewise.ai/threats/cve-2026-33804-fastify-fastify-middie-middleware-bypass-via-duplicate-slashes  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-16. Updated: 2026-05-14  
License: CC BY 4.0 with a link back

CVE-2026-33804 · Severity: high · CVSS 7.4 · Published 2026-04-16

@fastify/middie is a software component used to add middleware support to the Fastify web framework. A security flaw exists where certain security checks, such as authentication or authorization, can be bypassed if the application is configured to ignore duplicate slashes in web addresses. An attacker could exploit this by using specially crafted URLs (e.g., starting with double slashes) to access restricted areas of a website without proper permission.

Technologies: [Fastify Middie](https://junglewise.ai/threats/technologies/middie), [@fastify/middie (npm)](https://junglewise.ai/threats/technologies/fastify-middie). Vendors: [Fastify](https://junglewise.ai/threats/vendors/fastify), [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-33804 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-33804 being exploited in the wild.

**How severe is CVE-2026-33804?** High severity, with a CVSS score of 7.4, published 16 April 2026.

**Which products and versions are affected?** Fastify Middie <= 9.3.1; @fastify/middie (npm) <= 9.3.1, SEMVER:introduced=0,fixed=9.3.2.

**Is there a fix for CVE-2026-33804?** Yes. @fastify/middie (npm): upgrade to 9.3.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-33804 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-33804?** Check whether you run Fastify Middie or @fastify/middie (npm) 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.

## How to fix

- @fastify/middie (npm): upgrade to 9.3.2 or later

  ```sh
  npm install @fastify/middie@9.3.2
  ```


## Technical details

A middleware bypass vulnerability exists in @fastify/middie due to an interpretation conflict (CWE-436) between the middleware and the Fastify router. When the deprecated top-level 'ignoreDuplicateSlashes: true' option is used, the Fastify router normalizes duplicate slashes in incoming requests, but the middie middleware does not. This discrepancy allows an attacker to craft requests with duplicate slashes (e.g., '//admin') that fail to match middleware path patterns (avoiding auth/authz checks) but are correctly routed to protected handlers by the framework. This issue specifically affects applications using the deprecated top-level configuration rather than the newer 'routerOptions' configuration. The vulnerability is addressed in version 9.3.2.

## Affected products

- Fastify @fastify/middie <= 9.3.1

## Identifiers

- CVE-2026-33804
- GHSA-v9ww-2j6r-98q6

## Timeline

- 2026-04-16: disclosed
- 2026-04-16: advisory
- 2026-04-16: patched

## References

- [https://cna.openjsf.org/security-advisories.html](https://cna.openjsf.org/security-advisories.html)
- [https://github.com/fastify/middie/security/advisories/GHSA-v9ww-2j6r-98q6](https://github.com/fastify/middie/security/advisories/GHSA-v9ww-2j6r-98q6)

## Related threats

- [@fastify/middie path-scoped middleware bypass via absolute-form request](https://junglewise.ai/threats/cve-2026-85184-fastify-middie-path-scoped-middleware-bypass-via-absolute-form)
- [Fastify @fastify/middie authorization bypass via encoded slash in path parameters](https://junglewise.ai/threats/cve-2026-14198-fastify-fastify-middie-authorization-bypass-via-encoded-slash-in)
- [Fastify @fastify/middie authentication bypass in child plugin scopes](https://junglewise.ai/threats/cve-2026-6270-fastify-fastify-middie-middleware-bypass-in-child-plugin-scopes)
- [Fastify @fastify/middie auth bypass via improper path normalization](https://junglewise.ai/threats/cve-2026-2880-fastify-fastify-middie-auth-bypass-via-improper-path-normalization)
- [Fastify @fastify/middie middleware path bypass via URL encoding](https://junglewise.ai/threats/cve-2026-22031-fastify-fastify-middie-middleware-path-bypass-via-url-encoding)
