Skip to content
Heist/ feed
Back to feed
Critical

@fastify/express vulnerable to middleware path doubling causing authentication bypass in child plugin scopes

Type: advisorySources: OSV

@fastify/express v4.0.4 and earlier contains a path handling bug in the onRegister function that causes middleware paths to be doubled when inherited by child plugins. When a child plugin is registered with a prefix that matches a middleware path, the middleware path is prefixed a second time, causing it to never match incoming requests. This results in complete bypass of Express middleware security controls, including authentication, authorization, and rate limiting, for all routes defined within affected child plugin scopes. No special configuration or request crafting is required. Upgrade to @fastify/express v4.0.5 or later.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-33807
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 02:45 UTC · Revision 1

Source evidence

@fastify/express vulnerable to middleware path doubling causing authentication bypass in child plugin scopes

core-osv · Original source

Published 15 Apr 2026, 09:52 UTC

@fastify/express v4.0.4 and earlier contains a path handling bug in the onRegister function that causes middleware paths to be doubled when inherited by child plugins. When a child plugin is registered with a prefix that matches a middleware path, the middleware path is prefixed a second time, causing it to never match incoming requests. This results in complete bypass of Express middleware security controls, including authentication, authorization, and rate limiting, for all routes defined within affected child plugin scopes. No special configuration or request crafting is required. Upgrade to @fastify/express v4.0.5 or later.

osv:CVE-2026-33807
Complete source record
{
  "id": "72e2d7f7150842f101504ce06f10f1b88e1fb587e4cf9468dd975bf4c5be696c",
  "url": "https://osv.dev/vulnerability/CVE-2026-33807",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "@fastify/express vulnerable to middleware path doubling causing authentication bypass in child plugin scopes",
    "summary": "@fastify/express v4.0.4 and earlier contains a path handling bug in the onRegister function that causes middleware paths to be doubled when inherited by child plugins. When a child plugin is registered with a prefix that matches a middleware path, the middleware path is prefixed a second time, causing it to never match incoming requests. This results in complete bypass of Express middleware security controls, including authentication, authorization, and rate limiting, for all routes defined within affected child plugin scopes. No special configuration or request crafting is required. Upgrade to @fastify/express v4.0.5 or later.",
    "evidence": "osv:CVE-2026-33807",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2026-33807",
      "aliases": [
        "CVE-2026-33807",
        "GHSA-hrwm-hgmj-7p9c"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/fastify/fastify-express",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "f52f4476cbd874a9526027082b9e075d3bff63ac"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "4.0.5"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  },
                  {
                    "cpe": "cpe:2.3:a:fastify:fastify\\/express:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "4.0.5"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v4.0.4",
            "v4.0.3",
            "v4.0.2",
            "v4.0.1",
            "v4.0.0",
            "v3.0.0",
            "v2.3.0",
            "v2.2.0",
            "v2.1.0",
            "v2.0.2",
            "v2.0.1",
            "v2.0.0",
            "v1.1.0",
            "v1.0.0",
            "v0.3.3",
            "v0.3.2",
            "v0.3.1",
            "v0.3.0",
            "v0.2.0",
            "v0.1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-33807.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:49.094859713Z",
      "provider": "osv",
      "references": [
        "https://cna.openjsf.org/security-advisories.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/33xxx/CVE-2026-33807.json",
        "https://github.com/fastify/fastify-express/security/advisories/GHSA-hrwm-hgmj-7p9c",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-33807"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-436"
        ],
        "cna_assigner": "openjs",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/33xxx/CVE-2026-33807.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-33807",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 517473,
  "published_at": "2026-04-15T09:52:26.838+00:00"
}