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

Authorization Bypass via URL Canonicalization Drift in @fastify/middie

Alon Barad
Alon Barad
Software Engineer

Feb 28, 2026·6 min read·36 visits

Executive Summary (TL;DR)

Attackers can bypass authentication middleware in Fastify applications using @fastify/middie < 9.2.0 by sending crafted URLs (e.g., //admin). The router normalizes the path and serves the resource, but the middleware engine fails to match the prefix, skipping security checks.

A high-severity authentication bypass vulnerability exists in @fastify/middie, the middleware engine for the Fastify web framework. The flaw stems from a discrepancy in URL path normalization between the middleware matching engine and Fastify's core router. By crafting malicious HTTP requests with specific path anomalies—such as duplicate slashes or semicolon delimiters—an attacker can bypass path-scoped middleware (e.g., authentication or validation layers) while still reaching the intended route handler. This effectively neutralizes security controls applied to specific route prefixes.

Vulnerability Overview

CVE-2026-2880 represents a critical breakdown in the request processing pipeline of Fastify applications utilizing the @fastify/middie plugin. This component provides Express-style middleware support for Fastify, allowing developers to mount logic (such as authentication checks, logging, or input sanitization) to specific path prefixes using app.use('/prefix', callback).

The vulnerability is a classic example of Canonicalization Drift (also known as Parser Differential). In modern web architectures, security decisions are often made by one component (the middleware engine) while routing decisions are made by another (the application router). If these two components view the same HTTP request path differently, security gaps emerge. Specifically, if the router normalizes a request path to match a route handler, but the middleware engine views the raw path and decides not to apply security controls, the protection is effectively bypassed.

This flaw specifically affects Fastify instances where standard router normalization options—such as ignoreDuplicateSlashes or ignoreTrailingSlash—are enabled. An attacker can exploit this by injecting characters that are stripped by the router but preserved by the middleware matcher.

Root Cause Analysis

The root cause of this vulnerability is the inconsistency between how Fastify's internal router (find-my-way) and @fastify/middie processed URL paths prior to version 9.2.0. Fastify allows developers to configure strict or loose routing behavior via routerOptions. Common configurations include:

  • ignoreDuplicateSlashes: Converts //path to /path.
  • ignoreTrailingSlash: Treats /path/ and /path as identical.
  • useSemicolonDelimiter: Truncates paths at semicolons for matrix parameter handling.

When a request arrives, Fastify's router applies these normalization rules to determine which route handler to execute. However, @fastify/middie performed its prefix matching logic against the raw or insufficiently normalized req.url. Consequently, if a developer mounted authentication middleware at /admin, the middleware engine would strictly look for that string at the start of the URL.

If an attacker sends a request to //admin/settings (double slash), the middleware matcher compares /admin against //admin. The match fails, and the middleware calls next(), assuming the request is not destined for the protected scope. However, the Fastify router subsequently processes the request, collapses the double slashes to /admin/settings, and successfully locates the route handler. The request is processed without the authentication middleware ever executing.

Code Analysis: Matching Logic

The fix in version 9.2.0 involves synchronizing the normalization logic within the middleware engine to match the configuration of the parent Fastify instance. The patch ensures that if the router is configured to ignore duplicate slashes or trailing slashes, the middleware matcher applies the same transformations before checking the prefix.

Below is a reconstruction of the logic flow illustrating the vulnerability and the remediation:

Vulnerable Logic (Simplified)

In versions prior to 9.2.0, the matching logic relied on simple string comparisons or standard regex against the incoming request URL, ignoring the specific routerOptions set on the Fastify instance.

// Pseudo-code of vulnerable behavior
function runMiddleware(req, res) {
  const url = req.url; // e.g., "//secret/data"
  
  // Middleware mounted on "/secret"
  const prefix = "/secret";
  
  // VULNERABILITY: Strict string check fails on "//"
  if (url.startsWith(prefix)) {
    return authMiddleware(req, res);
  }
  
  // Middleware skipped, request proceeds to router
  next();
}

Patched Logic (v9.2.0)

The patched version introduces a sanitization step that respects the router's configuration. It retrieves routerOptions and preemptively cleans the URL before attempting a match.

// Pseudo-code of fixed behavior
function runMiddleware(req, res) {
  let url = req.url; // e.g., "//secret/data"
  
  // FIX: Apply router normalization rules first
  if (fastify.initialConfig.ignoreDuplicateSlashes) {
    url = url.replace(/\/+/g, '/'); // Becomes "/secret/data"
  }
  
  if (fastify.initialConfig.ignoreTrailingSlash) {
     // Remove trailing slash logic...
  }
 
  const prefix = "/secret";
  
  // Match now succeeds: "/secret/data" starts with "/secret"
  if (url.startsWith(prefix)) {
    return authMiddleware(req, res);
  }
  
  next();
}

This ensures that the middleware "sees" the same path that the router will eventually use for dispatching.

Exploitation Methodology

Exploiting this vulnerability requires no authentication and can be performed with standard HTTP tools (cURL, Burp Suite). The success of the exploit depends on the specific routerOptions enabled in the target Fastify application.

Attack Scenarios

  1. Double Slash Bypass

    • Prerequisite: ignoreDuplicateSlashes: true (often default or common).
    • Target: app.use('/admin', auth)
    • Payload: GET //admin/users HTTP/1.1
    • Result: Middleware sees //admin (mismatch). Router sees /admin/users (match). Access granted.
  2. Semicolon/Matrix Parameter Bypass

    • Prerequisite: useSemicolonDelimiter: true.
    • Target: app.use('/api/v1', keyCheck)
    • Payload: GET /api/v1;foo=bar/resource HTTP/1.1
    • Result: Middleware may fail to match the complex path structure depending on regex strictness. Router truncates at ;, seeing /api/v1/resource. Access granted.

Proof of Concept

The following script demonstrates the bypass against a vulnerable instance:

const Fastify = require('fastify');
const middie = require('@fastify/middie');
 
const app = Fastify({
  // Vulnerability trigger: Router normalizes, middie < 9.2.0 does not
  ignoreDuplicateSlashes: true 
});
 
app.register(middie).then(() => {
  // Security Middleware
  app.use('/secret', (req, res, next) => {
    res.statusCode = 403;
    res.end('Blocked by Middleware');
  });
 
  // Protected Route
  app.get('/secret/data', async () => {
    return { sensitive: 'data' };
  });
 
  // EXPLOIT: "//secret" bypasses the middleware check
  app.inject({
    method: 'GET',
    url: '//secret/data'
  }).then(res => {
    console.log(res.statusCode); // 200 (Bypass successful)
    console.log(res.payload);
  });
});

Impact Assessment

The impact of CVE-2026-2880 is High because it directly undermines the primary mechanism used to secure routes in Fastify applications utilizing the middie plugin. Middleware is conventionally used for critical security functions:

  • Authentication: Validating JWTs, session cookies, or API keys.
  • Authorization: Enforcing role-based access control (RBAC).
  • Rate Limiting: Tracking request frequency by IP.
  • Input Validation: Sanitizing request bodies or query parameters.

A successful exploit bypasses all middleware defined for the target path. If an application relies solely on path-scoped middleware for authentication (e.g., app.use('/admin', requireAdmin)), an unauthenticated remote attacker can gain full administrative access to the underlying route handlers. The vulnerability does not require user interaction or prior privileges.

CVSS v4.0 Metric Analysis:

  • AV:N (Network): Exploitable remotely over the internet.
  • AT:P (Attack Requirements: Present): The attack relies on specific router configurations (e.g., ignoreDuplicateSlashes), which are common but not universal.
  • VI:H (Integrity: High): The integrity of the application's access control model is completely compromised for affected routes.

Official Patches

FastifyRelease notes for v9.2.0

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.04%
Top 100% most exploited

Affected Systems

@fastify/middie < 9.2.0Fastify applications using path-scoped middleware

Affected Versions Detail

Product
Affected Versions
Fixed Version
@fastify/middie
Fastify
< 9.2.09.2.0
AttributeDetail
CVE IDCVE-2026-2880
CVSS v4.08.2 (High)
CWE IDCWE-20 (Improper Input Validation)
Attack VectorNetwork
Exploit StatusPoC Available
Patch StatusAvailable (v9.2.0)

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1068Exploitation for Privilege Escalation
Privilege Escalation
CWE-20
Improper Input Validation

Improper Input Validation

Known Exploits & Detection

GitHub Security AdvisoryAdvisory containing reproduction steps and regression tests.

Vulnerability Timeline

Vulnerability Published
2026-02-27
Patch Released (v9.2.0)
2026-02-27

References & Sources

  • [1]GHSA-8p85-9qpw-fwgw
  • [2]NVD CVE-2026-2880

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 22 hours ago•GHSA-7PPR-R889-MCF2
7.5

GHSA-7PPR-R889-MCF2: Unbounded WebSocket Message Aggregation in http4s-blaze-server leads to Denial of Service

An uncontrolled resource consumption vulnerability exists in the Scala-based http4s-blaze-server package of the http4s/blaze library. The vulnerability allows remote, unauthenticated attackers to cause an Out of Memory Error (OOM) and JVM crash by streaming a continuous sequence of small or empty WebSocket continuation frames with the FIN bit set to 0. This bypasses typical payload size checks because of the JVM's per-object allocation overhead, leading to rapid heap exhaustion with minimal network bandwidth.

Alon Barad
Alon Barad
6 views•5 min read
•about 23 hours ago•GHSA-95CV-R8X4-VH75
7.6

GHSA-95cv-r8x4-vh75: Path Traversal Vulnerability in OpenList Batch Rename Handler

A critical path traversal vulnerability has been identified in the OpenList Go-based backend package. The vulnerability exists within the batch rename handler because the application does not validate the source filename parameter before constructing filesystems paths. This omission allows authenticated users to escape their designated directory and rename files in sibling paths.

Amit Schendel
Amit Schendel
7 views•7 min read
•about 24 hours ago•GHSA-P6PH-3JX2-3337
4.3

GHSA-P6PH-3JX2-3337: Horizontal Privilege Escalation and Metadata Information Disclosure via Bleve Search in OpenList

OpenList version 4.2.3 and prior is vulnerable to an authorization bypass and metadata leakage. When configured with the Bleve search engine backend, OpenList fails to perform separator-aware path matching when validating tenant containment. This allows authenticated users to access sibling directories sharing similar name prefixes. Furthermore, the search backend returns unfiltered global result counts, leaking existence verification data of unauthorized files via side-channel analysis.

Amit Schendel
Amit Schendel
7 views•5 min read
•1 day ago•GHSA-86CX-WWF4-PHQ4
6.5

GHSA-86cx-wwf4-phq4: Path Prefix Confusion Authorization Bypass in OpenList

An authorization bypass vulnerability in OpenList version 4.2.3 and below allows authenticated users to read arbitrary files outside of their designated base directories due to an insecure path prefix check using Go's standard strings.HasPrefix function.

Amit Schendel
Amit Schendel
6 views•6 min read
•1 day ago•CVE-2026-16584
7.0

CVE-2026-16584: Security Policy Bypass in AWS API MCP Server via Startup Initialization Failure

A security policy bypass vulnerability exists in the AWS API MCP Server (awslabs-aws-api-mcp-server) from version 0.2.13 through 1.3.46. When the server fails to load the read-only operations index during startup (due to transient network failures, file permission issues, or other exceptions), it logs a warning but continues running in an insecure, degraded state. Under this condition, the security policy engine fails open, silently skipping all subsequent security checks and consent prompts for the lifetime of the process. This permits unauthorized mutating AWS CLI commands to execute via indirect prompt injection attacks.

Amit Schendel
Amit Schendel
8 views•7 min read
•1 day ago•GHSA-6V4M-FW66-8R4X
6.5

GHSA-6V4M-FW66-8R4X: Path Disclosure and Shell Expansion Bypass in Shescape

An incomplete escaping vulnerability in the npm package 'shescape' allows unauthenticated users to trigger dynamic shell expansions, absolute path disclosure, and command block break-outs on Unix and Windows systems.

Alon Barad
Alon Barad
6 views•7 min read