External risk intelligence

@fastify/express Regular Expression Mount Path Bypass Allows Unauthenticated Access.

CVE advisorySeverity: CRITICAL (CVSS 9.1)

CVE-2026-133867

This vulnerability affects a web framework middleware plugin used to integrate Express middleware into Fastify. Because this plugin is specifically used to construct and secure web application routes and APIs, it is commonly deployed as part of internet-facing web services and applications. The nature of the component makes it a standard part of public-facing web infrastructure.

Authentication Bypass

Halo Surface Signal: 4 out of 5 — likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

A vulnerability in the @fastify/express compatibility layer could allow unauthenticated access to protected routes if specific configurations involving regular expression middleware within parameterized prefixes are used. This issue arises because the plugin may not correctly handle the parameterized prefix, causing the Express middleware to be skipped while the route handler still executes, potentially bypassing authentication or authorization checks. The problem is resolved in newer versions of the plugin.

  • Middleware bypasses security checks on some routes.
  • Critical for confirming if authentication is compromised.
  • Verify if this compatibility layer is in use.

Attack Path

How an attacker could exploit the issue

An attacker could target applications using a compatibility layer for Express middleware within the Fastify web framework. If this layer is configured with a parameterized prefix and middleware is mounted using a regular expression, the Express matcher may incorrectly interpret the prefix. This bypasses intended security checks, allowing unauthenticated access to protected routes.

  • Requires parameterized prefix and regex mount.
  • Express middleware is unexpectedly skipped.
  • Bypasses authentication on protected routes.

Live Threat

Current exploitation, exposure, and threat context

When @fastify/express is used with a parameterized prefix and regular-expression mounted middleware, applications could bypass authentication or authorization checks, exposing protected routes to unauthenticated clients.

  • Protected routes could be exposed.
  • Express matcher may fail to match requests.
  • Unauthorized access to sensitive information.

Operational Fix

Recommended remediation, mitigation, and detection steps

This vulnerability in @fastify/express impacts applications using regular-expression mount paths within parameterized Fastify prefixes, potentially exposing protected routes. Infrastructure or platform teams managing Fastify deployments are likely responsible for assessing and remediating this issue. The first practical step is to identify all instances of the affected @fastify/express version, determine if they are exposed externally or host critical business functions, and then coordinate with application owners to plan an upgrade.

  • Application and platform teams own the fix.
  • Verify Express middleware usage with parameterized prefixes.
  • Upgrade @fastify/express to version 4.0.10 or later.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is @fastify/express?

@fastify/express is a software bridge that allows developers to use existing Express middleware within the Fastify web framework. It is used by teams that want to migrate to or combine the high-performance Fastify architecture with established Express-based utilities, such as logging, body parsing, or security-focused authentication middleware.

How does CVE-2026-133867 cause security issues?

This vulnerability involves a flaw in path processing, categorized as CWE-287 (Improper Authentication) and CWE-436 (Interpretation Conflict). When specific routing patterns are used, the plugin fails to correctly sync the URL path between the frameworks. Because the Express component incorrectly ignores part of the route, it fails to execute security checks, essentially rendering authentication logic invisible to the application.

Do I need both a regex mount and a parameterized prefix to trigger this?

Yes. The vulnerability specifically occurs when you combine a parameterized plugin prefix with middleware mounted via a regular expression. Applications that use standard, static routes or do not rely on this specific combination of features are not affected by this bypass behavior.

Why is this CVE considered relevant for my web services?

According to Halo Surface Signal, this plugin is frequently used in web applications that handle traffic, making it a common part of public-facing infrastructure. Because the bug can silently disable authentication, any internet-facing application relying on this middleware for access control is at risk of exposing protected data.

How do I secure my application against this vulnerability?

The most effective response is to update the @fastify/express package to version 4.0.10 or later. First, audit your codebase to see if you use parameterized prefixes and regular-expression mounted middleware. If you find these patterns in use, prioritize testing and upgrading to the patched version to ensure security middleware executes correctly for all incoming requests.

References