CVE-2026-33804: @fastify/middie @fastify/middie Vulnerable To Middleware Bypass Vulnerability
HIGHCVE-2026-33804 is a HIGH (CVSS 7.4) @fastify/middie vulnerable to middleware bypass vulnerability (CWE-436: Interpretation Conflict) affecting @fastify/middie libraries in the npm ecosystem. The issue involves @fastify/middie vulnerable to middleware bypass via deprecated ignoreduplicateslashes option. Remediation is available by upgrading affected packages to version 9.3.2.
CVE-2026-33804 at a Glance
Security Impact
CVSS: 7.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2026-33804
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-33804, 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-33804 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-33804?
Which @fastify/middie versions are affected?
What version fixes CVE-2026-33804?
Is @fastify/middie affected?
What is the CVSS score of CVE-2026-33804?
What CWE is associated with CVE-2026-33804?
How can I check npm dependencies for CVE-2026-33804?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v9ww-2j6r-98q6",
"modified" : "2026-04-16T22:28:54Z",
"published" : "2026-04-16T22:28:54Z",
"aliases" : [ "CVE-2026-33804" ],
"summary" : "@fastify/middie vulnerable to middleware bypass via deprecated ignoreDuplicateSlashes option",
"details" : "### Impact\n\n`@fastify/middie` v9.3.1 and earlier does not read the deprecated (but still functional) top-level `ignoreDuplicateSlashes` option, only reading from `routerOptions`. This creates a normalization gap: Fastify's router normalizes duplicate slashes but middie does not, allowing middleware bypass via URLs with duplicate leading slashes (e.g., `//admin/secret`).\n\nThis only affects applications using the deprecated top-level configuration style (`fastify({ ignoreDuplicateSlashes: true })`). Applications using `routerOptions: { ignoreDuplicateSlashes: true }` are not affected.\n\nThis is distinct from [GHSA-8p85-9qpw-fwgw](https://github.com/fastify/middie/security/advisories/GHSA-8p85-9qpw-fwgw) (CVE-2026-2880), which was patched in v9.2.0.\n\n### Patches\n\nUpgrade to `@fastify/middie` >= 9.3.2.\n\n### Workarounds\n\nMigrate from deprecated top-level `ignoreDuplicateSlashes: true` to `routerOptions: { ignoreDuplicateSlashes: true }`.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/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/middie/security/advisories/GHSA-v9ww-2j6r-98q6"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33804"
}, {
"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" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-16T22:28:54Z",
"nvd_published_at" : "2026-04-16T15:17:34Z"
}
}