CVE-2026-6270: @fastify/middie Authentication Bypass Vulnerability

CRITICAL
Advisory Identifier: GHSA-72c6-fx6q-fr5w
CVSS 9.1
CWE-436
Published
Advisory Summary

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

CVE-2026-6270 at a Glance

CVE Identifier CVE-2026-6270
GHSA Identifier GHSA-72c6-fx6q-fr5w
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-436: Interpretation Conflict
Affected Product @fastify/middie
Package Ecosystem npm
Published Date
Last Updated

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
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-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.

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

### Impact `@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. This 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. This 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`. ### Patches Upgrade to `@fastify/middie` v9.3.2 or later. ### Workarounds None. Upgrade to the patched version.

CVE-2026-6270 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-6270?
CVE-2026-6270 is a security vulnerability in @fastify/middie involving @fastify/middie vulnerable to middleware authentication bypass in child plugin scopes 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-6270?
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-6270?
CVE-2026-6270 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2026-6270?
CVE-2026-6270 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-6270?
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-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"
  }
}