Vulnerabilities in pkg:npm/@fastify/middie
PACKAGECVE-2026-6270 is a CRITICAL (CVSS 9.1) authentication bypass vulnerability (CWE-436: Interpretation Conflict) affecting @fastify/middie libraries in the npm ecosystem. The issue involves @fastify/middie vulnerable to middleware authentication bypass in child plugin scopes. Remediation is available by upgrading affected packages to version 9.3.2.
pkg:npm/@fastify/middie
Vulnerability advisories affecting package pkg:npm/@fastify/middie. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-72c6-fx6q-fr5w | CVE-2026-6270 | CRITICAL | @fastify/middie vulnerable to middleware authentication bypass in child plugin scopes |
| GHSA-v9ww-2j6r-98q6 | CVE-2026-33804 | HIGH | @fastify/middie vulnerable to middleware bypass via deprecated ignoreDuplicateSlashes option |
| GHSA-8p85-9qpw-fwgw | CVE-2026-2880 | HIGH | @fastify/middie has Improper Path Normalization when Using Path-Scoped Middleware |
| GHSA-cxrg-g7r8-w69p | CVE-2026-22031 | HIGH | Fastify Middie Middleware Path Bypass |
CVE-2026-6270 at a Glance
Security Impact
CVSS: 9.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2026-6270
To remediate this vulnerability, upgrade all affected @fastify/middie dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @fastify/middie@9.3.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @fastify/middie
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-6270, inspect your project dependencies using npm:
npm ls @fastify/middie
Analyze the terminal output to locate any version of @fastify/middie in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 9.3.2), your application is affected.
Note: The npm ls @fastify/middie command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-436: Interpretation Conflict, where product a handles inputs or steps differently than product b, which causes a to perform incorrect actions based on its perception of b's state. In @fastify/middie, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-6270 Affected @fastify/middie Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@fastify/middie
|
npm |
< 9.3.2
|
9.3.2
|
References
Frequently Asked Questions
What is CVE-2026-6270?
Which @fastify/middie versions are affected?
What version fixes CVE-2026-6270?
Is @fastify/middie affected?
What is the CVSS score of CVE-2026-6270?
What CWE is associated with CVE-2026-6270?
How can I check npm dependencies for CVE-2026-6270?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-72c6-fx6q-fr5w",
"modified" : "2026-04-16T22:29:04Z",
"published" : "2026-04-16T22:29:04Z",
"aliases" : [ "CVE-2026-6270" ],
"summary" : "@fastify/middie vulnerable to middleware authentication bypass in child plugin scopes",
"details" : "### Impact\n\n`@fastify/middie` v9.3.1 and earlier incorrectly re-prefixes middleware paths when propagating them to child plugin scopes. When a child plugin is registered with a prefix that overlaps with a parent-scoped middleware path, the middleware path is modified during inheritance and silently fails to match incoming requests.\n\nThis results in complete bypass of middleware security controls for all routes defined within affected child plugin scopes, including nested (grandchild) scopes. Authentication, authorization, rate limiting, and any other middleware-based security mechanisms are skipped. No special request crafting or configuration is required.\n\nThis is the same vulnerability class as [GHSA-hrwm-hgmj-7p9c](https://github.com/fastify/fastify-express/security/advisories/GHSA-hrwm-hgmj-7p9c) (CVE-2026-33807) in `@fastify/express`.\n\n### Patches\n\nUpgrade to `@fastify/middie` v9.3.2 or later.\n\n### Workarounds\n\nNone. Upgrade to the patched version.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@fastify/middie"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "9.3.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 9.3.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/fastify/fastify-express/security/advisories/GHSA-hrwm-hgmj-7p9c"
}, {
"type" : "WEB",
"url" : "https://github.com/fastify/middie/security/advisories/GHSA-72c6-fx6q-fr5w"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-6270"
}, {
"type" : "WEB",
"url" : "https://cna.openjsf.org/security-advisories.html"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/fastify/middie"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-436" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-16T22:29:04Z",
"nvd_published_at" : "2026-04-16T14:16:19Z"
}
}