External risk intelligence

Fastify Express Path Traversal Bypass Leads to Unauthenticated Access

CVE advisorySeverity: CRITICAL (CVSS 9.1)

CVE-2026-124626

The vulnerability affects a middleware plugin for the Fastify web framework, which is commonly used to build internet-facing web applications and API services. Because the component is directly integrated into the request routing and handling flow of web applications, any exposed web endpoint using this plugin is potentially reachable from the internet.

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

The @fastify/express plugin, a tool for running Express middleware within the Fastify web framework, has a vulnerability that could allow unauthenticated requests to reach protected handlers in certain configurations. This occurs when a request with an empty dynamic segment bypasses the Express middleware, potentially exposing application logic. The severity of this issue hinges on the specific application's use of the affected component.

  • Allows unauthenticated access to protected routes.
  • Matters if your web apps use Fastify and Express middleware.
  • Confirm relevance and exposure for your web applications.

Attack Path

How an attacker could exploit the issue

An attacker could exploit this by sending a request with an empty dynamic segment to a web application using the `@fastify/express` plugin. This request bypasses Express middleware that should have protected a handler, allowing the attacker to reach and potentially trigger a sensitive operation without authentication. The exact impact depends on the application's configuration.

  • Unauthenticated network access required.
  • Empty dynamic segment in request path.
  • Sensitive handler reachable and triggered.

Live Threat

Current exploitation, exposure, and threat context

When supported by the advisory, unauthenticated requests could bypass protected handlers when an empty dynamic segment is used in a route, allowing access to sensitive information or unauthorized actions.

  • Protected application endpoints.
  • Via requests with empty dynamic segments.
  • Unauthenticated access to sensitive data.

Operational Fix

Recommended remediation, mitigation, and detection steps

The @fastify/express compatibility layer can allow unauthenticated requests to bypass protected handlers when dynamic route segments are empty. This impacts applications using Express middleware within Fastify, potentially exposing sensitive functionality depending on how the empty value is processed. System owners should first identify where this component is deployed, confirm its exposure and criticality, and then coordinate with application and platform teams to plan remediation.

  • Application owners, platform teams.
  • Verify unauthenticated reachability of protected handlers.
  • Plan upgrade or apply mitigating configurations.

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 the @fastify/express package?

This software is a compatibility layer designed for the Fastify web framework. It allows developers to use Express-style middleware within a Fastify application, effectively bridging the two ecosystems. It is used in web services to maintain existing middleware logic while utilizing Fastify's high-performance routing capabilities.

What is the weakness in CVE-2026-124626?

The issue involves improper handling of route parameters, categorized as CWE-287 (Improper Authentication) and CWE-436 (Interpretation Conflict). The middleware and the Fastify router interpret dynamic path segments differently; specifically, the middleware rejects empty values that the router accepts. This conflict causes security checks to be skipped entirely.

How can an attacker trigger this bypass?

An attacker triggers the vulnerability by crafting a web request that includes an empty dynamic segment in the URL path. This bypass does not occur with standard, non-empty parameters. When the application receives the empty segment, the routing engine processes the request while the security middleware fails to intercept it.

Is my application at risk?

According to Halo Surface Signal, risk is likely if your web application is internet-facing and uses this plugin. Since the component is deeply integrated into request routing, any public endpoint utilizing this middleware for access control is potentially reachable and vulnerable to unauthorized handler execution.

What should I do to address CVE-2026-124626?

The primary step is to upgrade your dependency to @fastify/express version 4.0.10 or later. Start by auditing your project to locate where this plugin is implemented. Once identified, coordinate with your development team to verify if any protected routes rely on dynamic segments that could be bypassed, and proceed with the package update.

References