CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-33807

CVE-2026-33807: Middleware Bypass via Path Interpretation Conflict in @fastify/express

Alon Barad
Alon Barad
Software Engineer

Apr 16, 2026·6 min read·27 visits

Executive Summary (TL;DR)

@fastify/express <= 4.0.4 incorrectly doubles path prefixes during child plugin registration, bypassing security middleware on encapsulated child routes.

A critical vulnerability exists in @fastify/express versions 4.0.4 and earlier where an interpretation conflict causes middleware paths to be incorrectly calculated during plugin inheritance. This flaw allows unauthenticated remote attackers to bypass security middleware, such as authentication and authorization controls, on specific routes defined within child plugin scopes.

Vulnerability Overview

The @fastify/express package serves as a compatibility layer for integrating legacy Express middleware into the Fastify ecosystem. It allows developers to utilize established Express ecosystem tools for authentication, rate limiting, and request validation without rewriting them as Fastify-native hooks. This component maps Express's middleware execution model onto Fastify's encapsulated routing architecture.

The vulnerability is classified as an interpretation conflict (CWE-436) occurring within the plugin registration lifecycle. Specifically, the flaw exists in how the package clones parent scope state into newly initialized child plugins via the onRegister hook. Fastify relies on this mechanism to ensure that middleware registered at a higher level applies symmetrically to lower-level encapsulated routes.

Due to incorrect path calculation logic, the compatibility layer fails to bind the inherited middleware to the correct paths in the child scope. This results in an absolute bypass of the security controls enforced by that middleware for all matching child routes. An attacker can access restricted endpoints without supplying required credentials or passing required validation steps.

Root Cause Analysis

The root cause originates in the prefix calculation logic used by the @fastify/express compatibility layer prior to version 4.0.5. The custom use(path, fn) method prepends the current Fastify instance prefix to the provided path argument. This computed string is then stored internally alongside the middleware function in a collection identified by the kMiddlewares symbol.

Fastify utilizes an onRegister hook to clone parent state into newly registered child plugins. The vulnerable implementation of this hook iterates over the parent's stored kMiddlewares collection to propagate the configurations. For each entry, it invokes the child instance's use method, passing the previously computed and stored path.

The failure condition triggers when the child instance receives this path argument. Because the child's use method independently prepends its own prefix, and the provided path is already prefixed from the parent, the resulting route binding is doubled. For example, a middleware intended for /admin becomes bound to /admin/admin.

Furthermore, a secondary interpretation conflict exists regarding path normalization. Fastify's native router can be configured to ignore duplicate slashes. If the Express middleware engine processes paths without an identical normalization rule, an attacker can append redundant slashes to force a string mismatch, bypassing the middleware entirely while still reaching the destination Fastify route.

Code Analysis

An analysis of the vulnerable code path reveals reliance on the decorated instance.use() method during the inheritance lifecycle. This method inherently applies the current scope's prefix to whatever path argument it receives. The logic assumes it is receiving an un-prefixed base path, which is false during onRegister cloning operations.

The primary logic correction in commit c4e49b5244fcfadb38dc08e9b1808c5d759021a2 changes how the middleware is applied to the child instance. The developers modified the onRegister hook to bypass the decorated use method entirely. By invoking the underlying Express instance directly via instance.express.use(path, fn), the redundant prefixing logic is avoided.

The secondary fix implemented in commit 674020f27ddc1d1709e4369cb40158d4c958d42b addresses the normalization discrepancy. This change introduces a normalizeUrl utility function within the middleware pipeline. It synchronizes the incoming request URL format with Fastify's internal routerOptions, ensuring that both routing layers evaluate paths identically regardless of duplicate slashes.

Exploitation Methodology

Exploitation requires specific architectural preconditions within the target application. The application must utilize @fastify/express version 4.0.4 or earlier. Additionally, it must implement child plugins that define endpoints overlapping with the prefix of a parent-level middleware block. The middleware in question must be responsible for access control or security validation.

To execute the attack, an unauthenticated remote actor sends an HTTP request targeting a valid endpoint within the vulnerable child plugin scope. Because the security middleware is improperly bound to the doubled path structure, the application evaluates the request without invoking the middleware chain. The underlying Fastify route handler processes the request normally.

The public Proof-of-Concept demonstrates this by establishing a root scope that enforces authentication on the /admin path. A child plugin is subsequently registered with the same /admin prefix, containing a restricted /secret route. The root-level route correctly returns a 403 Forbidden status when accessed without credentials.

When the attacker requests the /admin/secret endpoint, the server returns a 200 OK status alongside the restricted data. The authentication middleware is bypassed because it is internally listening on /admin/admin/*. The discrepancy allows unauthorized access with low complexity.

Impact Assessment

The vulnerability directly undermines the core access control mechanisms of the affected application. Bypassing authentication or authorization middleware grants unauthenticated users the same operational capabilities as authenticated administrators or users. This facilitates unauthorized access to sensitive data and allows the execution of restricted state-modifying functions.

The application scope is broadly impacted by this flaw. Any endpoint defined within an affected child plugin loses the protection of the parent's Express middleware. This structural failure breaks the expected security boundaries defined by developers, leading to systemic exposure of encapsulated routes.

The CVSS v3.1 vector evaluates to 9.1 (Critical). The base score is driven by the lack of required privileges and the absence of user interaction. The attack relies solely on standard network requests and has low complexity, making it trivial to automate against affected infrastructure.

The EPSS score is currently low at 0.00052, reflecting the recent disclosure date. However, the availability of a clear Proof-of-Concept significantly increases the likelihood of active exploitation. Security teams should prioritize remediation to prevent unauthorized data access.

Remediation Strategy

The definitive remediation is to upgrade the @fastify/express dependency to version 4.0.5 or later. This release contains the necessary structural patches to ensure path variables are correctly inherited and normalized during plugin registration. Application owners should update their package.json and regenerate their lockfiles to pull the correct transitive dependencies.

In environments where immediate patching is unfeasible, developers must restructure their application architecture. Refactoring the codebase to use Fastify-native hooks (onRequest, preHandler) for security controls eliminates reliance on the vulnerable compatibility layer. Alternatively, developers can avoid using prefixed child plugins in conjunction with Express security middleware.

Validation of the fix requires testing the application routing logic. Security engineers should execute unauthenticated requests against all previously protected child plugin endpoints in a staging environment. Verification is successful when these requests return the expected 401 Unauthorized or 403 Forbidden responses.

Official Patches

FastifyOfficial Security Advisory

Fix Analysis (2)

Technical Appendix

CVSS Score
9.1/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
EPSS Probability
0.05%
Top 84% most exploited

Affected Systems

Node.js applications utilizing Fastify with the @fastify/express compatibility plugin

Affected Versions Detail

Product
Affected Versions
Fixed Version
@fastify/express
Fastify
<= 4.0.44.0.5
AttributeDetail
CWE IDCWE-436
Attack VectorNetwork
CVSS Base Score9.1 (Critical)
EPSS Score0.00052
Exploit StatusProof-of-Concept Available
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1548Abuse Elevation Control Mechanism
Privilege Escalation
T1550Use Alternate Authentication Material
Defense Evasion
T1070Indicator Removal on Host
Defense Evasion
CWE-436
Interpretation Conflict

Interpretation Conflict

Known Exploits & Detection

Security AdvisoryProof of concept code demonstrating the middleware bypass in child scopes.

Vulnerability Timeline

Vulnerability Disclosed & CVE Assigned
2026-04-15
Patch Released (v4.0.5)
2026-04-15
Public Advisory Published
2026-04-16

References & Sources

  • [1]GHSA-hrwm-hgmj-7p9c
  • [2]CVE-2026-33807 NVD Details
  • [3]OpenJS Foundation Advisory

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 11 hours ago•CVE-2026-55854
5.9

CVE-2026-55854: Cleartext Credential Disclosure in MariaDB Connector/Node.js via Coerced Authentication Switch

CVE-2026-55854 identifies a critical security flaw in the MariaDB Connector for Node.js (mariadb npm package). When establishing connections, the driver fails to validate transport security requirements during Pluggable Authentication Modules (PAM) dialog authentication. This vulnerability allows active on-path attackers or malicious database servers to coerce the client driver into transmitting user credentials in cleartext over unencrypted TCP connections.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 12 hours ago•CVE-2026-55764
8.7

CVE-2026-55764: Integer Overflow in SFT Circulation Counter in Klever-Go

An integer overflow vulnerability (CWE-190) exists in klever-go, the Go implementation of the Klever blockchain protocol, within the Semi-Fungible Token (SFT) addition path. An attacker with a mint role can exploit this by passing an extremely large positive value when adding SFT quantity, which overflows a signed 64-bit integer. This bypasses the maximum supply checks and allows minting arbitrary tokens while corrupting the state.

Alon Barad
Alon Barad
4 views•8 min read
•about 13 hours ago•CVE-2026-55841
7.5

CVE-2026-55841: Log Evasion and Tampering in Graylog FortiGate Syslog Parser

A high-severity log evasion and tampering vulnerability in Graylog's FortiGate key-value syslog parser allows unauthenticated remote attackers to modify, delete, or overwrite critical security log fields, potentially bypassing security controls and monitoring systems.

Alon Barad
Alon Barad
6 views•7 min read
•about 14 hours ago•CVE-2026-55867
5.3

CVE-2026-55867: Insecure Direct Object Reference in Graylog Access-Token Revocation

An Insecure Direct Object Reference (IDOR) vulnerability exists within the access-token revocation endpoint of Graylog. Authenticated users can exploit this flaw to delete access tokens belonging to other users, including high-privileged administrator accounts, thereby disrupting active integrations and API access.

Alon Barad
Alon Barad
6 views•7 min read
•about 15 hours ago•CVE-2026-55873
4.3

CVE-2026-55873: Improper Authorization in SeaweedFS S3Tables and Iceberg REST Management APIs

An improper authorization vulnerability in SeaweedFS versions 4.08 through 4.33 allows authenticated, low-privileged users to bypass directory isolation and perform unauthorized metadata operations within S3Tables and Iceberg REST interfaces. The vulnerability arises from an automatic collapse of account-less static identities to the default administrative principal, combined with a fail-open default policy configuration and self-referential authorization parameters in the table bucket listing routines. Together, these logical flaws expose administrative configurations and namespace architectures to unprivileged actors. The issue is resolved in version 4.34 by enforcing capability-based access checks, isolating fallback modes, and performing granular access verification on target buckets.

Alon Barad
Alon Barad
3 views•6 min read
•about 16 hours ago•CVE-2026-55874
7.7

CVE-2026-55874: Cross-Bucket Path Traversal in SeaweedFS S3 API Gateway

A critical path traversal vulnerability (CVE-2026-55874) in the SeaweedFS S3 API Gateway prior to version 4.34 allows authenticated remote attackers with write access to at least one bucket to bypass isolation. By supplying crafted directory traversal sequences in the X-Amz-Copy-Source header, an attacker can read objects from arbitrary buckets on the same deployment.

Amit Schendel
Amit Schendel
4 views•7 min read