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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-2025-32442

CVE-2025-32442: Fastify Auth Bypass Vulnerability

CVE-2025-32442 is an authentication bypass vulnerability in Fastify that allows attackers to circumvent validation by altering content type headers. This article covers the technical details, affected versions, and mitigation.

Updated: January 22, 2026

CVE-2025-32442 Overview

CVE-2025-32442 is a validation bypass vulnerability in Fastify, a fast and low overhead web framework for Node.js. Applications that specify different validation strategies for different content types are susceptible to bypassing input validation through manipulation of the Content-Type header. An attacker can exploit this by providing a slightly altered content type, such as with different casing or altered whitespace before the ; delimiter.

Critical Impact

Attackers can bypass input validation controls by manipulating Content-Type headers, potentially allowing malicious payloads to reach application logic without proper sanitization.

Affected Products

  • Fastify versions 5.0.0 through 5.3.0
  • Fastify version 4.29.0
  • Applications using content-type-specific validation schemas

Discovery Timeline

  • 2025-04-18 - CVE CVE-2025-32442 published to NVD
  • 2025-08-22 - Last updated in NVD database

Technical Details for CVE-2025-32442

Vulnerability Analysis

This vulnerability stems from improper input validation in the Content-Type header parsing mechanism within Fastify's validation module. When applications define different validation schemas for different content types (such as application/json versus application/xml), Fastify attempts to match incoming requests to the appropriate validator based on the Content-Type header value.

The flaw exists in how the framework extracts the essence (media type) from the Content-Type header. The original implementation used a simple string split on the semicolon character to isolate the media type before any parameters. However, this approach failed to account for case sensitivity and whitespace variations that are technically valid according to HTTP specifications but could be used to evade schema matching.

An attacker could craft requests with Content-Type values like Application/JSON (different casing) or application/json ;charset=utf-8 (whitespace before semicolon) to bypass the validation schema associated with application/json. This allows untrusted input to flow into the application without the expected validation, potentially leading to injection attacks or data integrity issues.

Root Cause

The root cause is classified as CWE-1287 (Improper Validation of Specified Type of Input). The vulnerability exists in the getEssenceMediaType function within lib/validation.js. The initial implementation only split on the semicolon delimiter without normalizing case or handling whitespace before the delimiter.

The initial patch in v5.3.1 addressed some issues by adding .trim().toLowerCase() to normalize the extracted media type. However, it was discovered that spaces before the semicolon could also be used as a bypass vector, leading to an incomplete fix. The final patch modified the split regex from /;/ to /[ ;]/ to treat both spaces and semicolons as delimiters.

Attack Vector

The attack exploits the network-accessible nature of web applications. An attacker sends HTTP requests with manipulated Content-Type headers to bypass validation:

  1. Identify an endpoint with content-type-specific validation
  2. Craft a request with an altered Content-Type header (e.g., different case or added whitespace)
  3. Submit malicious payload that would normally be rejected by the validator
  4. The application processes the unvalidated input

Initial patch (incomplete) - lib/validation.js:

javascript
       validatorFunction = context[bodySchema]
     } else if (context[bodySchema]) {
       // TODO: add request.contentType and reuse it here
-      const contentType = request.headers['content-type']?.split(';', 1)[0]
+      const contentType = getEssenceMediaType(request.headers['content-type'])
       const contentSchema = context[bodySchema][contentType]
       if (contentSchema) {
         validatorFunction = contentSchema

Source: GitHub Commit 436da4c

Complete fix - lib/validation.js:

javascript
  */
 function getEssenceMediaType (header) {
   if (!header) return ''
-  return header.split(';', 1)[0].trim().toLowerCase()
+  return header.split(/[ ;]/, 1)[0].trim().toLowerCase()
 }

 module.exports = {

Source: GitHub Commit f3d2bcb

Detection Methods for CVE-2025-32442

Indicators of Compromise

  • HTTP requests with unusual Content-Type header casing (e.g., Application/JSON, APPLICATION/json)
  • Content-Type headers containing whitespace before the semicolon delimiter (e.g., application/json ;charset=utf-8)
  • Validation errors or bypasses logged in application logs following unusual Content-Type patterns
  • Unexpected data processing for endpoints with strict content-type validation requirements

Detection Strategies

  • Implement Web Application Firewall (WAF) rules to detect and flag Content-Type headers with anomalous casing or whitespace patterns
  • Monitor application logs for validation bypass indicators, particularly on endpoints using content-type-specific schemas
  • Perform regular dependency audits to identify vulnerable Fastify versions in your environment using npm audit or similar tools
  • Configure API gateway logging to capture and analyze Content-Type header variations

Monitoring Recommendations

  • Enable verbose logging for Fastify request processing to capture Content-Type header values
  • Set up alerts for validation failures that may indicate exploitation attempts
  • Monitor for patterns of requests attempting multiple Content-Type variations against the same endpoint
  • Review server access logs for systematic probing of Content-Type handling

How to Mitigate CVE-2025-32442

Immediate Actions Required

  • Upgrade Fastify to version 5.3.2 or later for version 5.x installations
  • Upgrade Fastify to version 4.29.1 or later for version 4.x installations
  • Audit applications to identify endpoints using content-type-specific validation schemas
  • Implement additional input validation at the application layer as defense-in-depth

Patch Information

Fastify has released patched versions addressing this vulnerability:

  • Version 5.3.2 - Complete fix for 5.x branch
  • Version 4.29.1 - Complete fix for 4.x branch

Note that version 5.3.1 contained an incomplete fix and should not be considered fully patched. Users should upgrade directly to 5.3.2 or later.

For detailed patch information, see the GitHub Security Advisory and the related HackerOne Report #3087928.

Workarounds

  • Avoid specifying individual content types in the validation schema; use a single unified validation approach
  • Implement custom middleware to normalize Content-Type headers before they reach Fastify's validation layer
  • Add application-level validation that explicitly normalizes and validates Content-Type headers
bash
# Upgrade Fastify to patched version
npm update fastify

# Verify installed version
npm list fastify

# For specific version installation
npm install fastify@5.3.2
# or for 4.x branch
npm install fastify@4.29.1

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

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.19%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-1287
  • Technical References
  • GitHub Security Advisory

  • HackerOne Report #3087928
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Commit Update
  • Related CVEs
  • CVE-2026-33804: Fastify Middie Auth Bypass Vulnerability

  • CVE-2026-6414: Fastify Static Auth Bypass Vulnerability

  • CVE-2026-33806: Fastify Auth Bypass Vulnerability

  • CVE-2026-3635: Fastify Authentication Bypass Vulnerability
Default Legacy - Prefooter | 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