Vulnerability DatabaseCVE-2026-133867

CVE-2026-133867: 
JavaScript vulnerability analysis and mitigation

Overview

CVE-2026-133867 is a critical authentication bypass vulnerability in the @fastify/express npm package, caused by improper handling of RegExp mount paths under parameterized Fastify plugin prefixes. When Express middleware is mounted using a RegExp (e.g., app.use(/^\/private/, authMiddleware)) inside a plugin registered with a parameterized prefix (e.g., /tenant/:tenantId), the Express matcher treats the prefix as literal text, causing it to silently skip the middleware while Fastify still executes the route handler. This allows unauthenticated clients to access routes that should be protected. Affected versions are @fastify/express >= 4.0.7 and < 4.0.10; version 4.0.10 contains the fix. The vulnerability was disclosed on November 20, 2026, with a CVSS v3.1 base score of 9.1 (Critical) (GitHub Advisory).

Technical details

The root cause is an interpretation conflict (CWE-436) combined with improper authentication enforcement (CWE-287): @fastify/express fails to rewrite RegExp-based Express mount paths to account for resolved parameterized Fastify plugin prefixes. When the Express router matcher is constructed, the parameterized segment (e.g., :tenantId) is embedded as a literal string rather than being treated as a wildcard, so the RegExp never matches real incoming URLs containing concrete tenant values (e.g., /tenant/acme/private/resource). As a result, Express silently skips the middleware, while Fastify's own router correctly resolves and dispatches the request to the route handler — effectively bypassing any authentication or authorization logic placed in the RegExp-mounted middleware. No special configuration beyond a parameterized prefix and a RegExp mount is required to trigger the bypass; default router settings are sufficient (GitHub Advisory).

Impact

Successful exploitation allows unauthenticated network attackers to access routes that are intended to be protected by Express middleware-based authentication or authorization, resulting in high confidentiality and integrity impact. Sensitive data exposed behind the protected routes can be read or manipulated without any credentials. Availability is not directly impacted, but the bypass could enable further actions such as unauthorized data modification, privilege escalation within the application, or access to multi-tenant data belonging to other users (GitHub Advisory).

Exploitability

A proof-of-concept exploit configuration is described in the GitHub Security Advisory, providing sufficient detail to reproduce the bypass without additional research, though no runnable exploit code has been published. The vulnerability requires no authentication, no user interaction, and no special privileges — only knowledge of a parameterized route prefix and a protected path. There is no evidence of active in-the-wild exploitation at this time, 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 a target application using @fastify/express versions >= 4.0.7 and < 4.0.10 that registers a Fastify plugin under a parameterized prefix (e.g., /tenant/:tenantId) and uses RegExp-mounted Express middleware for authentication (e.g., app.use(/^\/private/, authMiddleware)).
  2. Identify protected routes: Enumerate API endpoints or routes under the parameterized prefix that are expected to require authentication, such as /tenant/acme/private/resource.
  3. Send unauthenticated request: Issue an HTTP request directly to the protected route (e.g., GET /tenant/acme/private/resource) without any authentication token or credentials.
  4. Bypass achieved: Because the Express matcher was built with the literal string :tenantId rather than the resolved value acme, the RegExp mount never matches the real URL, the authMiddleware is silently skipped, and Fastify dispatches the request to the route handler — returning protected data or performing privileged actions without authentication (GitHub Advisory).

Indicators of compromise

  • Network: Unexpected unauthenticated HTTP requests to routes under parameterized plugin prefixes (e.g., /tenant/<value>/private/...) that would normally require authentication tokens or session cookies; absence of Authorization or Cookie headers in requests to protected endpoints.
  • Logs: Application access logs showing successful 2xx responses to protected paths for requests lacking authentication headers; absence of authentication middleware log entries for requests that reach route handlers under parameterized prefixes.
  • Application Behavior: Route handlers executing and returning data for requests that should have been rejected by middleware; unexpected data access patterns across tenant namespaces in multi-tenant applications (GitHub Advisory).

Mitigation and workarounds

Upgrade @fastify/express to version 4.0.10 or later, which correctly rewrites RegExp mount paths to account for parameterized plugin prefixes. If an immediate upgrade is not possible, two workarounds are available: (1) enforce authentication using a Fastify hook such as preHandler that runs after the router resolves the request, ensuring authentication logic is not dependent on Express middleware matching; or (2) avoid RegExp mount paths under parameterized plugin prefixes by using string-based mount paths or restructuring the application to move route parameters out of the plugin prefix (GitHub Advisory).

Community reactions

The advisory was published by mcollina (a core Fastify maintainer) on November 20, 2026, with remediation review credited to UlisesGascon and the vulnerability reported by kleju13. The advisory notes AI assistance was used in its preparation. 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