CVE-2026-33804: @fastify/middie @fastify/middie Vulnerable To Middleware Bypass Vulnerability

HIGH
Advisory Identifier: GHSA-v9ww-2j6r-98q6
CVSS 7.4
CWE-436
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-33804
GHSA Identifier GHSA-v9ww-2j6r-98q6
Severity HIGH
CVSS v3.1 Base Score 7.4
CWE Classification CWE-436: Interpretation Conflict
Affected Product @fastify/middie
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (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.

@fastify/middie fixed: 9.3.2
npm install @fastify/middie@9.3.2
Verify Direct and Transitive Dependencies

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

### Impact `@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`). This only affects applications using the deprecated top-level configuration style (`fastify({ ignoreDuplicateSlashes: true })`). Applications using `routerOptions: { ignoreDuplicateSlashes: true }` are not affected. This 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. ### Patches Upgrade to `@fastify/middie` >= 9.3.2. ### Workarounds Migrate from deprecated top-level `ignoreDuplicateSlashes: true` to `routerOptions: { ignoreDuplicateSlashes: true }`.

CVE-2026-33804 Affected @fastify/middie Versions

1 component(s)
Fixed Versions:
9.3.2
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?
CVE-2026-33804 is a security vulnerability in @fastify/middie involving @fastify/middie vulnerable to middleware bypass via deprecated ignoreDuplicateSlashes option under CWE-436: Interpretation Conflict.
Which @fastify/middie versions are affected?
Affected versions include releases prior to 9.3.2 across affected packages: @fastify/middie.
What version fixes CVE-2026-33804?
Upgrading to 9.3.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @fastify/middie affected?
Yes, @fastify/middie is affected in releases prior to 9.3.2. Upgrade your dependency to 9.3.2 or later.
What is the CVSS score of CVE-2026-33804?
CVE-2026-33804 has a CVSS v3.1 base score of 7.4 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2026-33804?
CVE-2026-33804 is classified under CWE-436: Interpretation Conflict (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.).
How can I check npm dependencies for CVE-2026-33804?
Run the dependency tree command: 'npm ls @fastify/middie'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}