The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-22037

CVE-2026-22037: @fastify/express Auth Bypass Vulnerability

CVE-2026-22037 is an authentication bypass flaw in @fastify/express plugin that allows attackers to bypass middleware using URL-encoded characters. This article covers technical details, affected versions, and mitigation steps.

Published: January 23, 2026

CVE-2026-22037 Overview

A security vulnerability exists in the @fastify/express plugin that allows attackers to bypass middleware authentication and authorization controls through URL-encoded path traversal. The @fastify/express plugin provides full Express compatibility to Fastify applications, but versions prior to 4.0.3 contain a path matching flaw that enables unauthorized access to protected endpoints.

The vulnerability arises from a mismatch between how the middleware engine and the underlying Fastify router handle URL-encoded paths. When middleware is registered with a specific path prefix (e.g., /admin), attackers can bypass these security controls by using URL-encoded equivalents (e.g., /%61dmin). The middleware engine fails to match the encoded path and skips execution, while Fastify correctly decodes and routes the request to the protected handler.

Critical Impact

Attackers can bypass authentication middleware and access control mechanisms to reach protected API endpoints without authorization, potentially exposing sensitive data and functionality.

Affected Products

  • @fastify/express versions prior to 4.0.3
  • Fastify applications using @fastify/express middleware for path-based access control
  • Node.js applications with Express middleware compatibility layers

Discovery Timeline

  • 2026-01-19 - CVE CVE-2026-22037 published to NVD
  • 2026-01-19 - Last updated in NVD database

Technical Details for CVE-2026-22037

Vulnerability Analysis

This authorization bypass vulnerability (CWE-177: Improper Handling of URL Encoding) stems from inconsistent path normalization between the middleware matching layer and the Fastify routing engine. When security-critical middleware is registered on a path prefix, the application expects all requests to that path to pass through the middleware before reaching the route handler.

The vulnerability enables a complete bypass of middleware-based security controls. In typical deployments, this could mean bypassing authentication checks, authorization policies, rate limiting, input validation, or audit logging that administrators believed were protecting specific routes.

This vulnerability is similar to CVE-2026-22031 but affects a different npm module with its own codebase. Organizations using @fastify/express for middleware compatibility should treat this as a distinct vulnerability requiring separate remediation.

Root Cause

The root cause lies in how @fastify/express matches incoming request paths against registered middleware paths. The middleware matching logic compares paths without first decoding URL-encoded characters, while the Fastify router performs proper URL decoding before route matching.

This creates a security gap where:

  1. A request to /%61dmin/sensitive is not recognized as matching the /admin middleware prefix
  2. The middleware is skipped entirely
  3. Fastify decodes the path to /admin/sensitive and routes to the protected handler
  4. The handler executes without the expected middleware protections

Attack Vector

The attack exploits the network-accessible nature of web applications. An attacker with low privileges can craft HTTP requests containing URL-encoded path segments to bypass middleware restrictions. The attack requires no user interaction and can affect resources beyond the vulnerable component's scope.

An attacker identifies a protected endpoint (e.g., /admin/users) and replaces characters with their URL-encoded equivalents. Common encoding substitutions include %61 for a, %64 for d, or %2f for /. The request bypasses middleware but reaches the intended route handler.

javascript
 
const fp = require('fastify-plugin')
const Express = require('express')
+const FindMyWay = require('find-my-way')
const kMiddlewares = Symbol('fastify-express-middlewares')

function fastifyExpress (fastify, options, next) {

Source: GitHub Commit Change

The patch introduces find-my-way to properly decode paths before matching against registered middleware, ensuring consistent path handling between the middleware layer and router.

Detection Methods for CVE-2026-22037

Indicators of Compromise

  • HTTP access logs containing URL-encoded characters in path segments that would normally be alphanumeric (e.g., /%61dmin, /%75ser, /%61pi)
  • Requests to protected endpoints that lack corresponding middleware execution logs
  • Authentication or authorization middleware logs showing gaps where protected routes were accessed
  • Unusual access patterns to administrative or sensitive API endpoints from unauthorized sources

Detection Strategies

  • Implement web application firewall (WAF) rules to detect and alert on excessive URL encoding in path segments
  • Configure application logging to capture both raw and decoded request paths for comparison analysis
  • Deploy anomaly detection for access to protected routes that bypasses expected middleware execution flow
  • Monitor for requests containing double-encoding or unusual character substitutions in URI paths

Monitoring Recommendations

  • Enable verbose logging in @fastify/express to track middleware execution per request
  • Implement request correlation to verify middleware execution for all protected route accesses
  • Set up alerts for any access to administrative endpoints that doesn't include expected authentication headers or session tokens
  • Review access logs for patterns of encoded path requests targeting known protected prefixes

How to Mitigate CVE-2026-22037

Immediate Actions Required

  • Upgrade @fastify/express to version 4.0.3 or later immediately
  • Audit all middleware registrations to identify security-critical path-based middleware
  • Review access logs for evidence of exploitation attempts using URL-encoded path bypasses
  • Consider implementing additional authorization checks at the route handler level as defense-in-depth

Patch Information

The vulnerability is resolved in @fastify/express version 4.0.3. The fix introduces the find-my-way library to properly decode request paths before matching against registered middleware paths. This ensures consistent path handling between middleware matching and route resolution.

Organizations should update their package.json dependencies and run npm update @fastify/express or yarn upgrade @fastify/express to obtain the patched version. For additional details, refer to the GitHub Security Advisory.

Workarounds

  • Implement authorization checks directly in route handlers rather than relying solely on path-based middleware
  • Deploy a reverse proxy or WAF that normalizes URL-encoded paths before forwarding requests to the application
  • Add custom middleware at the application root that decodes and re-encodes paths consistently before processing
  • Temporarily disable access to sensitive endpoints until the patch can be applied
bash
# Upgrade @fastify/express to patched version
npm install @fastify/express@4.0.3

# Verify installed version
npm list @fastify/express

# For yarn users
yarn add @fastify/express@4.0.3

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechFastify Express

  • SeverityHIGH

  • CVSS Score8.4

  • EPSS Probability0.06%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-177
  • Technical References
  • GitHub Commit Change

  • GitHub Security Advisory
  • Latest CVEs
  • CVE-2026-35467: Browser API Key Information Disclosure

  • CVE-2026-35466: cveInterface.js XSS Vulnerability

  • CVE-2026-30252: ZenShare Suite XSS Vulnerability

  • CVE-2026-30251: ZenShare Suite v17.0 XSS Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English