Low Severity CVE-2026-133250
Published: Nov 28, 2026

[GitHub] CVE-2026-133250

Other
Type
N/A
CVSS Score
9
Views
Anonymous
Author

Description

@fastify/middie <9.3.8 (CVE-2026-133250, CVSS 9.1): path-to-regexp and find-my-way disagree on crafted targets, letting unauthenticated clients reach handlers behind path-scoped auth middleware. Differential: four bypass forms succeed on 9.3.7 and are rejected on 9.3.8. Includes lab, PoC, standalone exploit and evidence.

# CVE-2026-133250 — @fastify/middie path-scoped middleware bypass

| | |
|---|---|
| **CVE** | CVE-2026-133250 |
| **Component** | `@fastify/middie` — Fastify middleware engine, `lib/engine.js`; reached through path-scoped `app.use(path, handler)` mounts |
| **Affected** | `@fastify/middie` < 9.3.8 (all releases through 9.3.7) |
| **Fixed in** | 9.3.8, commit `6073bd6277630408eb767bcff434183675ca7ba9` |
| **CWE** | CWE-288 (authentication bypass using an alternate path or channel), CWE-436 (interpretation conflict) |
| **Impact** | Unauthenticated access to handlers protected by authentication, authorization, or rate-limiting middleware |
| **Vector** | Crafted HTTP request target; no special configuration required |
| **Trigger** | Empty parameter or wildcard value, non-slash-prefixed target, or literal `%` in a mount path |
| **Credit** | Matteo Collina (`mcollina`), remediation developer; Ulises Gascón (`UlisesGascon`), remediation reviewer |

`@fastify/middie` decides whether a request passes through path-scoped middleware
using a different path parser than Fastify uses to route the request. The two
parsers disagree on several request-target forms. A client can therefore reach a
handler that is covered by an authentication middleware while that middleware is
skipped. The bypass is unauthenticated and requires no unusual deployment
configuration.

## 1. Root cause

`lib/engine.js` compiles each middleware mount with `pathToRegexp()` from the
`path-to-regexp` package, while Fastify dispatches with `find-my-way`. In
9.3.7 the mount regexp is built directly from the sanitized mount path:

```js
const pathRegExp = pathToRegexp(sanitizeMountPath(spec, ignoreDuplicateSlashes), {
end: false
})
```

`find-my-way` matches a parameter or wildcard against an empty value, but
`path-to-regexp` requires at least one character. A request for
`/tenant//admin` therefore reaches the `/tenant/:id/admin` route with an empty
`id`, while the middie mount for that route does not matc

Community Rating
0

Login to rate this exploit

Quick Actions