# CVE-2026-133867: @fastify/express vulnerable to middleware bypass via RegExp mount paths under parameterized prefixes

> Express middleware using regexes under parameterized prefixes in Fastify apps may skip authentication, exposing protected routes to unauthenticated clients.

- **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:** 23 Nov 2026
- **Also known as:** GHSA-84w6-xrf3-f8q8

## What is CVE-2026-133867?

CVE-2026-133867 is a critical authentication bypass vulnerability in @fastify/express, 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/express is a compatibility layer that lets Express middleware run inside the Fastify web framework. In versions 4.0.7 through 4.0.9, the plugin does not rewrite regular-expression mount paths to account for a parameterized plugin prefix, so when middleware is mounted with a regular expression inside a plugin registered under a parameterized prefix, the Express matcher treats the prefix parameter as literal text and never matches the real request path. As a result, Express silently skips that middleware while Fastify still runs the route handler, so an application that relies on regular-expression mounted middleware for authentication or authorization inside a parameterized-prefix plugin exposes protected routes to unauthenticated clients. No special configuration is required beyond a parameterized prefix and a regular-expression mount. The issue is fixed in @fastify/express 4.0.10, and users should upgrade to 4.0.10 or later.

Weakness: CWE-436 (Interpretation Conflict), CWE-287 (Improper Authentication)

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

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

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/express` | npm | `pkg:npm/%40fastify/express` | From 4.0.7 | 4.0.10 |

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

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

## Is CVE-2026-133867 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2026-133867 is a critical authentication bypass vulnerability in @fastify/express, 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-133867 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/express (npm): affected from 4.0.7; fixed in 4.0.10

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-133867/ (Markdown: https://insights.sbomify.com/CVE-2026-133867/index.md)
```

## Sources

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

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