2026-11-21 17:8CVE-2026-133120openjs
PUBLISHED5.2CWE-174CWE-436

@fastify/express vulnerable to path-scoped middleware bypass via request URL decoding and normalization mismatches

@fastify/express is a compatibility layer that lets Express middleware run inside the Fastify web framework. In versions before 4.0.10, the plugin passes Express a request URL that does not always match the path Fastify's router dispatched, so path-scoped Express middleware can be skipped while the route handler still runs. Several request forms trigger the mismatch, including percent-decoding that rewrites a backslash to a slash or double-decodes an encoded percent sign, and a request target that begins with an asterisk, so the middleware and the handler disagree on the path or on parameter and query values. An unauthenticated client can therefore reach a handler that an authentication, authorization, or rate-limiting middleware was meant to protect, with no special configuration required. The issue is fixed in @fastify/express 4.0.10, and users should upgrade to 4.0.10 or later.

Problem type

Affected products

@fastify/express

@fastify/express

< 4.0.10 - AFFECTED

4.0.10 - UNAFFECTED

References

JSON source

https://cveawg.mitre.org/api/cve/CVE-2026-133120
Click to expand
{
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "cveMetadata": {
    "cveId": "CVE-2026-133120",
    "assignerOrgId": "ce714d77-add3-4f53-aff5-83d477b104bb",
    "assignerShortName": "openjs",
    "dateUpdated": "2026-11-21T17:08:07.453Z",
    "dateReserved": "2026-11-19T12:57:33.628Z",
    "datePublished": "2026-11-21T17:08:07.453Z",
    "state": "PUBLISHED"
  },
  "containers": {
    "cna": {
      "providerMetadata": {
        "orgId": "ce714d77-add3-4f53-aff5-83d477b104bb",
        "shortName": "openjs",
        "dateUpdated": "2026-11-21T17:08:07.453Z"
      },
      "title": "@fastify/express vulnerable to path-scoped middleware bypass via request URL decoding and normalization mismatches",
      "descriptions": [
        {
          "lang": "en",
          "value": "@fastify/express is a compatibility layer that lets Express middleware run inside the Fastify web framework. In versions before 4.0.10, the plugin passes Express a request URL that does not always match the path Fastify's router dispatched, so path-scoped Express middleware can be skipped while the route handler still runs. Several request forms trigger the mismatch, including percent-decoding that rewrites a backslash to a slash or double-decodes an encoded percent sign, and a request target that begins with an asterisk, so the middleware and the handler disagree on the path or on parameter and query values. An unauthenticated client can therefore reach a handler that an authentication, authorization, or rate-limiting middleware was meant to protect, with no special configuration required. The issue is fixed in @fastify/express 4.0.10, and users should upgrade to 4.0.10 or later.",
          "supportingMedia": [
            {
              "type": "text/html",
              "base64": false,
              "value": "@fastify/express is a compatibility layer that lets Express middleware run inside the Fastify web framework. In versions before 4.0.10, the plugin passes Express a request URL that does not always match the path Fastify's router dispatched, so path-scoped Express middleware can be skipped while the route handler still runs. Several request forms trigger the mismatch, including percent-decoding that rewrites a backslash to a slash or double-decodes an encoded percent sign, and a request target that begins with an asterisk, so the middleware and the handler disagree on the path or on parameter and query values. An unauthenticated client can therefore reach a handler that an authentication, authorization, or rate-limiting middleware was meant to protect, with no special configuration required. The issue is fixed in @fastify/express 4.0.10, and users should upgrade to 4.0.10 or later."
            }
          ]
        }
      ],
      "affected": [
        {
          "vendor": "@fastify/express",
          "product": "@fastify/express",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "0",
              "status": "affected",
              "versionType": "semver",
              "lessThan": "4.0.10"
            },
            {
              "version": "4.0.10",
              "status": "unaffected",
              "versionType": "semver"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "lang": "en",
              "description": "CWE-174: Double Decoding of the Same Data",
              "cweId": "CWE-174",
              "type": "CWE"
            }
          ]
        },
        {
          "descriptions": [
            {
              "lang": "en",
              "description": "CWE-436: Interpretation Conflict",
              "cweId": "CWE-436",
              "type": "CWE"
            }
          ]
        }
      ],
      "references": [
        {
          "url": "https://github.com/fastify/fastify-express/security/advisories/GHSA-w877-hjcp-88rc"
        },
        {
          "url": "https://cna.openjsf.org/security-advisories.html"
        }
      ],
      "metrics": [
        {
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ],
          "cvssV3_1": {
            "version": "3.1",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N",
            "baseScore": 9.1,
            "baseSeverity": "CRITICAL"
          }
        }
      ],
      "credits": [
        {
          "lang": "en",
          "value": "mcollina",
          "type": "finder"
        },
        {
          "lang": "en",
          "value": "UlisesGascon",
          "type": "remediation reviewer"
        }
      ]
    }
  }
}