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-2293

CVE-2026-2293: Path Canonicalization Bypass in NestJS Fastify Adapter

Alon Barad
Alon Barad
Software Engineer

Mar 2, 2026·5 min read·35 visits

Executive Summary (TL;DR)

CVE-2026-2293 allows unauthenticated attackers to bypass NestJS middleware guards when using the Fastify adapter. By exploiting differences in URL normalization, attackers can access protected endpoints using manipulated paths like `//admin` or `/ADMIN`. Fixed in version 11.1.14.

A high-severity path canonicalization vulnerability exists in the `@nestjs/platform-fastify` adapter of the NestJS framework. The vulnerability arises from a discrepancy between how the NestJS middleware engine matches routes (using raw URLs) and how the underlying Fastify router handles requests (using normalized URLs). This 'Differential Normalization' allows remote attackers to bypass route-scoped authentication and authorization middleware by crafting malformed URLs (e.g., containing double slashes or casing variations) that fail middleware regex matching but are successfully routed to protected controllers.

Vulnerability Overview

CVE-2026-2293 represents a critical breakdown in the request processing pipeline of NestJS applications utilizing the Fastify platform adapter. The core issue is a Path Canonicalization Mismatch (CWE-436), commonly referred to as Differential Normalization. In a layered web architecture, security controls (middleware) and request routing often operate as distinct components. When these components disagree on the interpretation of a URL path, security gaps emerge.

In the specific context of NestJS, the framework provides a middleware engine responsible for executing logic—such as authentication guards, logging, or input validation—before a request reaches its final route handler. This engine determines applicability by matching the incoming request path against defined patterns. However, the @nestjs/platform-fastify adapter historically performed this matching against the raw, unnormalized URL (req.originalUrl).

Conversely, the underlying Fastify server is highly configurable regarding URL normalization. It can be instructed to ignore trailing slashes, merge duplicate slashes, or ignore case sensitivity. When Fastify normalizes a request to route it, but NestJS fails to normalize the request before checking middleware applicability, a bypass occurs. The middleware assumes the request does not match the protected route and allows it to proceed, while Fastify subsequently routes the request to the sensitive endpoint.

Root Cause Analysis

The vulnerability is rooted in the decoupling of the middleware matching logic from the router's normalization logic. The NestJS middleware dispatcher relies on regular expressions generated from route paths to decide whether to execute a specific middleware. Prior to version 11.1.14, this regex matching was performed against the raw request string without accounting for the specific normalization configuration of the Fastify instance.

Technically, the failure mechanism works as follows:

  1. Configuration: The Fastify instance is configured with ignoreDuplicateSlashes: true. This tells Fastify that //api and /api are semantically identical.
  2. Definition: A developer defines a middleware scoped to the route /api/private.
  3. Matching Logic: NestJS converts /api/private into a strict regular expression (e.g., ^/api/private).
  4. Incoming Request: An attacker sends a request to //api/private.
  5. The Mismatch: The NestJS middleware engine compares the raw string //api/private against the regex ^/api/private. The match fails because of the leading double slash.
  6. Fail-Open: Because the match fails, the middleware is skipped (fail-open design).
  7. Routing: The request passes to Fastify. Fastify applies its normalization rules, converting //api/private to /api/private, and successfully dispatches the request to the route handler.

Code Analysis & Patch

The fix for CVE-2026-2293 introduces a synchronization mechanism between the Fastify adapter's configuration and the URL seen by the middleware matcher. The patch was applied in packages/platform-fastify/adapters/fastify-adapter.ts.

Vulnerable Logic (Conceptual): Previously, the adapter passed the raw request URL directly to the middleware container. There was no pre-processing step to align the URL with Fastify's internal router logic.

Patched Logic: The fix introduces a sanitizeUrl method. This method inspects the FastifyServerOptions (specifically routerOptions) and manually applies the same transformations that Fastify would apply later in the lifecycle.

// Analysis of the fix in FastifyAdapter
 
private sanitizeUrl(url: string): string {
  const initialConfig = this.instance.initialConfig as FastifyServerOptions;
  const routerOptions = initialConfig.routerOptions as Partial<FastifyServerOptions>;
 
  // Replicating 'ignoreDuplicateSlashes'
  if (routerOptions.ignoreDuplicateSlashes || initialConfig.ignoreDuplicateSlashes) {
    url = this.removeDuplicateSlashes(url);
  }
 
  // Replicating 'ignoreTrailingSlash'
  if (routerOptions.ignoreTrailingSlash || initialConfig.ignoreTrailingSlash) {
    url = this.trimLastSlash(url);
  }
 
  // Replicating 'caseSensitive'
  if (routerOptions.caseSensitive === false || initialConfig.caseSensitive === false) {
    url = url.toLowerCase();
  }
 
  // Decoding URI components to match router expectations
  return safeDecodeURI(
    url,
    routerOptions.useSemicolonDelimiter || initialConfig.useSemicolonDelimiter,
  ).path;
}

By ensuring the URL is sanitized before the middleware regex runs, NestJS ensures that any request Fastify would consider a match is also considered a match by the security middleware.

Exploitation Mechanics

Exploitation of this vulnerability is trivial and requires no authentication or special tools. The attacker merely needs to identify endpoints protected by middleware and manipulate the URL path based on the server's configuration.

Scenario 1: Duplicate Slashes If ignoreDuplicateSlashes: true (often default or common configuration):

  • Target: GET /admin/delete-user
  • Payload: GET //admin/delete-user
  • Result: Middleware for /admin is bypassed; Controller for /admin/delete-user executes.

Scenario 2: Case Sensitivity If caseSensitive: false:

  • Target: GET /api/v1/secure
  • Payload: GET /API/v1/SECURE
  • Result: Case-sensitive regex in middleware fails; Fastify case-insensitive router succeeds.

Exploit Flow Diagram:

The impact is direct Access Control Bypass. Since NestJS relies heavily on Guards and Interceptors for authorization, bypassing these layers grants full access to the underlying business logic.

Impact Assessment

The impact of CVE-2026-2293 is rated High (CVSS 8.2) because it completely undermines the integrity of the application's authorization model. While the vulnerability requires specific Fastify configurations to be exploitable, these configurations are common in production environments to ensure user-friendly URL handling.

  • Confidentiality: High. Attackers can access sensitive data endpoints (e.g., user records, financial data) that should be protected behind authentication guards.
  • Integrity: High. Attackers can trigger state-changing operations (e.g., deletion, updates) on protected resources.
  • Availability: Low/None. The vulnerability primarily facilitates unauthorized access rather than denial of service.

The vector CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N highlights that the attack is network-adjacent, low complexity, but requires specific attack requirements (AT:P, referring to the Fastify configuration prerequisites).

Official Patches

NestJSRelease v11.1.14 changelog
NestJSOfficial patch commit

Fix Analysis (1)

Technical Appendix

CVSS Score
8.2/ 10
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
EPSS Probability
0.11%
Top 71% most exploited

Affected Systems

NestJS Framework@nestjs/platform-fastifyNode.js Applications using Fastify

Affected Versions Detail

Product
Affected Versions
Fixed Version
@nestjs/platform-fastify
NestJS
< 11.1.1411.1.14
AttributeDetail
CWE IDCWE-436
Attack VectorNetwork
CVSS Score8.2 (High)
EPSS Score0.11%
ImpactAuthorization Bypass
Exploit StatusProof of Concept Available

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1068Exploitation for Privilege Escalation
Privilege Escalation
CWE-436
Interpretation Conflict

Interpretation Conflict (Path Canonicalization Mismatch)

Known Exploits & Detection

GitHubPatch regression tests demonstrate the exploit methodology

Vulnerability Timeline

Fix commit authored
2026-02-17
Vulnerability publicly disclosed
2026-02-27
Patch released in v11.1.14
2026-02-27

References & Sources

  • [1]Fluid Attacks Advisory (Neton)
  • [2]CVE Record

More Reports

•7 days ago•CVE-2026-9354
6.9

CVE-2026-9354: Arbitrary Mass Mention Bypass in NousResearch hermes-agent Slack and Mattermost Adapters

A vulnerability in the Slack and Mattermost platform adapters for NousResearch hermes-agent permits an unauthenticated remote attacker to execute arbitrary mass mentions. By leveraging prompt injection, an attacker can bypass output sanitization logic and trigger workspace-wide notification exhaustion.

Alon Barad
Alon Barad
36 views•6 min read
•8 days ago•CVE-2026-9306
6.3

CVE-2026-9306: Unauthenticated Insecure Direct Object Reference (IDOR) in QuantumNous new-api Midjourney Relay

CVE-2026-9306 is a critical unauthenticated Insecure Direct Object Reference (IDOR) vulnerability located in the QuantumNous new-api application, affecting versions up to and including 0.12.1. The flaw is caused by improper middleware ordering combined with a lack of object-level authorization checks. This allows remote, unauthenticated attackers to retrieve sensitive Midjourney images belonging to other users by supplying a valid task identifier.

Amit Schendel
Amit Schendel
13 views•5 min read
•8 days ago•GHSA-GGXF-37HM-9WQF
6.5

GHSA-GGXF-37HM-9WQF: Session Leakage via Unsafe Challenge Path Parsing in instagrapi

The instagrapi library prior to version 2.6.9 contains an improper input validation vulnerability within its challenge handling mechanism. Maliciously crafted server responses can manipulate the client into forwarding session cookies and credentials to an external attacker-controlled domain.

Amit Schendel
Amit Schendel
21 views•6 min read
•9 days ago•GHSA-QQQM-5547-774X
9.1

GHSA-QQQM-5547-774X: Unauthenticated Path Traversal in FileBrowser Quantum PATCH Handler

GHSA-QQQM-5547-774X is a critical path traversal vulnerability in the FileBrowser Quantum application, specifically within the Go backend package. The vulnerability resides in the HTTP handler responsible for processing bulk file modifications via the public API. Unauthenticated attackers can exploit an order-of-operations flaw in the path sanitization logic to bypass intended directory restrictions. This allows adversaries to arbitrarily read, move, and overwrite files on the underlying filesystem by supplying specially crafted HTTP PATCH requests.

Alon Barad
Alon Barad
11 views•6 min read
•9 days ago•CVE-2026-8723
5.3

CVE-2026-8723: Synchronous Denial of Service in qs npm Package via TypeError

The qs query string parsing and serialization library for Node.js is vulnerable to a synchronous Denial of Service (DoS) attack. The vulnerability manifests as a process-terminating TypeError when processing arrays with null or undefined elements under specific configuration parameters.

Amit Schendel
Amit Schendel
37 views•7 min read
•9 days ago•GHSA-7M8F-HGJQ-8GC9
7.5

GHSA-7M8F-HGJQ-8GC9: Pre-Authentication Denial of Service via Insecure Deserialization Order in aiosend

The aiosend library prior to version 3.0.6 contains a pre-authentication Denial of Service (DoS) vulnerability in its webhook handling mechanism. The software processes and deserializes incoming JSON payloads before verifying the cryptographic signature, allowing unauthenticated attackers to exhaust server CPU and memory resources by sending large, complex payloads.

Amit Schendel
Amit Schendel
4 views•6 min read