# CVE-2026-133250: @fastify/middie vulnerable to path-scoped middleware bypass via request path matching mismatches

> Unauthenticated clients can bypass path-scoped Fastify middleware protections via path-matching mismatches, reaching protected handlers.

- **Severity:** Critical 9.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Harmful if only installed:** No
- **Needs a specific call:** Yes
- **Fix available:** No
- **Published:** 21 Nov 2026
- **Updated:** 21 Nov 2026
- **Also known as:** GHSA-gcf6-j9m3-p97x

## What is CVE-2026-133250?

CVE-2026-133250 is a critical authentication bypass vulnerability in @fastify/middie, published on 21 Nov 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

@fastify/middie is the middleware engine for the Fastify web framework. In versions up to and including 9.3.7, middie matches path-scoped middleware against its own reading of the request path, which can differ from the path Fastify's router uses to dispatch the request. When the two disagree, the router can route a request to a handler covered by a middleware mount while middie skips that middleware, so an unauthenticated client reaches a handler that an authentication, authorization, or rate-limiting middleware was meant to protect, with no special configuration required. The mismatch is triggered by empty parameter or wildcard values, request targets that do not begin with a slash, and literal percent characters in a mount path. The issue is fixed in @fastify/middie 9.3.8, and users should upgrade to 9.3.8 or later.

Weakness: CWE-436 (Interpretation Conflict), CWE-288 (Authentication Bypass Using an Alternate Path or Channel)

## Which versions are affected by CVE-2026-133250?

1 open source package ship an affected version, including %40fastify/middie.

An affected version is only exploitable if your software uses the vulnerable function or option. Many projects that include it are not exposed.


| Package | Ecosystem | PURL | Affected | Fixed in |
| --- | --- | --- | --- | --- |
| `%40fastify/middie` | npm | `pkg:npm/%40fastify/middie` | All versions | 9.3.8 |

## How do I fix CVE-2026-133250?

Upgrade each affected package to the fixed version listed for it above. Each package has its own fixed versions.

## Is CVE-2026-133250 being exploited?

There is no known exploitation of CVE-2026-133250 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-133250 and fix it if it is affected.

What it is: CVE-2026-133250 is a critical authentication bypass vulnerability in @fastify/middie, published on 21 Nov 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-133250 in the wild and no public exploit code.
Exposure: An affected version is only exploitable if your software uses the vulnerable function or option. Many projects that include it are not exposed.

Affected packages and fixed versions:
- %40fastify/middie (npm): affected all versions; fixed in 9.3.8

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-133250/ (Markdown: https://insights.sbomify.com/CVE-2026-133250/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-133250
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-133250
- OSV: https://osv.dev/vulnerability/CVE-2026-133250

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-133250/
Summaries are generated and may contain mistakes; the official description above is the record.
