Vulnerability DatabaseCVE-2026-133120

CVE-2026-133120: 
JavaScript vulnerability analysis and mitigation

Overview

CVE-2026-133120 is a path-scoped middleware bypass vulnerability in the @fastify/express npm package that allows unauthenticated attackers to skip Express middleware (such as authentication, authorization, and rate limiting) while still reaching route handlers. The vulnerability stems from a URL mismatch between Fastify's router (find-my-way) and Express, requiring no special configuration to exploit. All versions prior to 4.0.10 are affected. It carries a CVSS v3.1 base score of 9.1 (Critical) (GitHub Advisory).

Technical details

The root cause is a combination of CWE-174 (Double Decoding of the Same Data) and CWE-436 (Interpretation Conflict) — @fastify/express passes Express a request URL that does not match the path Fastify's router dispatched, creating a desynchronization that allows middleware to be skipped. Three distinct attack vectors trigger this mismatch: (1) Since version 4.0.3, the plugin percent-decodes the URL before Express parses it, so a backslash combined with whitespace or # (e.g., /tenant/x%5C%20/admin) causes Express to rewrite \ to / and miss parameterized, prefixed, and RegExp mounts; (2) double-encoded percent sequences (e.g., /acct/%2561lice) cause middleware and handler to see different parameter values (alice vs. %61lice); and (3) in every release, a request target starting with * (e.g., GET *admin) is routed by Fastify to /admin while Express does not match the /admin mount, bypassing static mounts entirely. No authentication or special privileges are required to exploit any of these vectors (GitHub Advisory).

Impact

Successful exploitation allows an unauthenticated remote attacker to bypass path-scoped Express middleware — including authentication, authorization, and rate-limiting controls — and directly access protected route handlers. This results in high confidentiality and integrity impact, as attackers can read or modify data that should be protected behind middleware gates. For example, a route protected by app.use('/tenant/:id/admin', authMiddleware) becomes fully accessible without credentials. Availability is not directly impacted by the vulnerability itself (GitHub Advisory).

Exploitability

A proof-of-concept exploit (in the form of concrete crafted request targets) is publicly documented in the GitHub Security Advisory, though no standalone executable exploit code has been published. The advisory describes actionable bypass recipes requiring no authentication or user interaction, making exploitation straightforward for any network-accessible attacker. There is currently no evidence of in-the-wild exploitation, and the CVE status remains "Reserved." No EPSS score or CISA KEV catalog entry is currently available for this CVE (GitHub Advisory).

Exploitation steps

  1. Reconnaissance: Identify applications using @fastify/express versions prior to 4.0.10 with path-scoped Express middleware (e.g., app.use('/tenant/:id/admin', authMiddleware)) protecting sensitive routes.
  2. Asterisk bypass (all versions): Send a request with a target beginning with *, such as GET *admin HTTP/1.1, to a server with a route mounted at /admin. Fastify routes the request to /admin while Express fails to match the mount, skipping the middleware entirely.
  3. Backslash/whitespace bypass (versions ≥ 4.0.3): Send a percent-encoded request such as GET /tenant/x%5C%20/admin HTTP/1.1. The plugin decodes the URL before Express parses it; Express rewrites \ to / and fails to match parameterized or prefixed mounts, causing middleware to be skipped while the handler executes.
  4. Double-encoding bypass (versions ≥ 4.0.3): Send a request such as GET /acct/%2561lice HTTP/1.1. The double-decoded %25 causes middleware to see the parameter as alice while the handler receives %61lice, enabling parameter-based authorization checks in middleware to be bypassed.
  5. Access protected handler: With middleware skipped, the unauthenticated request reaches the route handler directly, allowing the attacker to read or modify protected data as if authenticated (GitHub Advisory).

Indicators of compromise

  • Network: HTTP requests to protected routes (e.g., /admin, /tenant/*/admin) with request targets beginning with * (e.g., GET *admin); requests containing percent-encoded backslashes (%5C) or double-encoded percent signs (%25) in the URL path targeting authenticated endpoints.
  • Logs: Access logs showing requests to admin or authenticated routes from unauthenticated sessions (no session token or authorization header) that received 2xx responses; requests with unusual URL patterns such as *admin, %5C%20, or %2561 in the path.
  • Application Behavior: Middleware-enforced rate limits or authentication checks not triggering for requests that successfully reach protected handlers; discrepancies between middleware-logged parameters and handler-logged parameters for the same request (GitHub Advisory).

Mitigation and workarounds

Upgrade @fastify/express to version 4.0.10 or later, which fixes the issue by ensuring Express receives the path the router matched, rejecting request targets that do not start with / with a 400 response, and keeping req.url query strings encoded. As a workaround if immediate upgrade is not possible, enforce authentication in a Fastify preHandler hook based on request.routeOptions.url rather than relying on path-scoped Express middleware. To block only the backslash and asterisk bypasses specifically, register an onRequest hook before @fastify/express that rejects request targets starting with * or whose path contains a backslash (GitHub Advisory).

Community reactions

The advisory was published by mcollina (Matteo Collina, a core Fastify maintainer) on November 20, 2026, with UlisesGascon credited as remediation reviewer, indicating the fix was developed and reviewed by the core Fastify team. No significant broader media coverage or notable external researcher commentary has been identified at this time (GitHub Advisory).

Additional resources


Source: This report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-133867CRITICAL9.1
  • JavaScript logoJavaScript
  • @fastify/express
NoYesNov 21, 2026
CVE-2026-133250CRITICAL9.1
  • JavaScript logoJavaScript
  • @fastify/middie
NoYesNov 21, 2026
CVE-2026-133120CRITICAL9.1
  • JavaScript logoJavaScript
  • @fastify/express
NoYesNov 21, 2026
CVE-2026-133312MEDIUM5.3
  • JavaScript logoJavaScript
  • @fastify/rate-limit
NoYesNov 21, 2026
CVE-2026-133273LOW3.7
  • JavaScript logoJavaScript
  • @fastify/swagger-ui
NoYesNov 21, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management