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-2026-34950

CVE-2026-34950: fast-jwt Auth Bypass Vulnerability

CVE-2026-34950 is an authentication bypass flaw in fast-jwt that allows JWT algorithm confusion attacks through whitespace exploitation. This article covers the technical details, affected versions, impact, and mitigation.

Published: April 10, 2026

CVE-2026-34950 Overview

CVE-2026-34950 is a critical cryptographic vulnerability in the fast-jwt library, a popular JSON Web Token (JWT) implementation for Node.js applications. The vulnerability exists in version 6.1.0 and earlier, where the publicKeyPemMatcher regex in fast-jwt/src/crypto.js uses a ^ anchor that can be bypassed by introducing leading whitespace in the key string. This flaw re-enables the exact same JWT algorithm confusion attack that was previously patched in CVE-2023-48223.

Critical Impact

Attackers can exploit this regex bypass to perform JWT algorithm confusion attacks, potentially forging valid tokens and bypassing authentication mechanisms in affected applications.

Affected Products

  • fast-jwt versions 6.1.0 and earlier
  • Node.js applications using vulnerable fast-jwt versions for JWT verification
  • Services relying on fast-jwt for authentication and authorization

Discovery Timeline

  • 2026-04-06 - CVE CVE-2026-34950 published to NVD
  • 2026-04-07 - Last updated in NVD database

Technical Details for CVE-2026-34950

Vulnerability Analysis

This vulnerability falls under CWE-327 (Use of a Broken or Risky Cryptographic Algorithm) and represents a regression of a previously patched security issue. The core problem lies in how the publicKeyPemMatcher regex validates PEM-formatted public keys during JWT verification.

The regex pattern uses a ^ anchor to match the beginning of the key string. However, this anchor only matches the absolute start of the string and is defeated when any leading whitespace characters (spaces, tabs, newlines) precede the actual PEM header. When the regex fails to match, the library may fall back to alternative key handling logic that enables algorithm confusion attacks.

In a JWT algorithm confusion attack, an attacker can trick the verification process into using the wrong algorithm. For instance, an attacker might craft a token signed with the HMAC algorithm using the public key as the secret, while the server expects an RSA-signed token. If the key validation is bypassed, the server may incorrectly verify the malicious token as valid.

Root Cause

The root cause is improper input validation in the publicKeyPemMatcher regex within fast-jwt/src/crypto.js. The regex relies on the ^ anchor for string start matching without accounting for leading whitespace characters that may be present in user-supplied or externally-sourced key material. This oversight creates a bypass condition where malformed keys with leading whitespace evade the intended validation logic.

Attack Vector

The attack vector is network-based and requires no authentication or user interaction. An attacker with knowledge of the application's public key can:

  1. Craft a JWT token with an alg header claiming symmetric algorithm (e.g., HS256)
  2. Prepend whitespace to the public key material to bypass the publicKeyPemMatcher regex
  3. Sign the token using the public key as an HMAC secret
  4. Submit the forged token to the target application
  5. The vulnerable validation logic may accept the malicious token as legitimate

The vulnerability can be exploited through the JWT verification process where an attacker-controlled token is submitted to an application using vulnerable versions of fast-jwt. The algorithm confusion attack allows authentication bypass and potential privilege escalation depending on the application's use of JWT claims.

Detection Methods for CVE-2026-34950

Indicators of Compromise

  • Unexpected JWT tokens with mismatched algorithm headers (e.g., HS256 instead of RS256)
  • Authentication logs showing successful validation of tokens with suspicious algorithm claims
  • Application logs indicating key parsing anomalies or regex matching failures
  • Unusual access patterns following authentication with forged credentials

Detection Strategies

  • Audit application dependencies for fast-jwt versions 6.1.0 and earlier using npm audit or similar tools
  • Implement monitoring for JWT tokens where the alg header differs from expected algorithm configurations
  • Review authentication logs for successful logins that bypass normal verification patterns
  • Deploy SentinelOne Singularity to detect exploitation attempts targeting Node.js applications

Monitoring Recommendations

  • Enable verbose logging for JWT verification operations to capture algorithm and key processing details
  • Monitor for authentication events with anomalous algorithm parameters in JWT headers
  • Set up alerts for dependency version changes and security advisory notifications for fast-jwt
  • Implement runtime application monitoring to detect unexpected cryptographic operation patterns

How to Mitigate CVE-2026-34950

Immediate Actions Required

  • Update fast-jwt to a patched version that addresses the regex bypass vulnerability
  • Review application configurations to ensure explicit algorithm specification during JWT verification
  • Audit existing authentication logs for potential exploitation attempts
  • Implement allowlist-based algorithm validation that rejects unexpected algorithm claims

Patch Information

The vulnerability is tracked in the GitHub Security Advisory GHSA-mvf2-f6gm-w987. Affected organizations should consult the security advisory for the latest patched version and upgrade instructions. The patch addresses the regex pattern to properly handle or reject keys with leading whitespace characters.

Workarounds

  • Configure explicit algorithm restrictions in JWT verification options to prevent algorithm confusion
  • Implement pre-validation of PEM key material to strip or reject inputs with leading whitespace
  • Use middleware to validate JWT alg header matches expected algorithm before verification
  • Consider implementing additional signature verification layers independent of fast-jwt
bash
# Check for vulnerable fast-jwt versions in your project
npm ls fast-jwt

# Update to the latest patched version
npm update fast-jwt

# Run security audit to identify vulnerable dependencies
npm audit

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

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechFast Jwt

  • SeverityCRITICAL

  • CVSS Score9.1

  • EPSS Probability0.02%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-327
  • Technical References
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-44351: fast-jwt Auth Bypass Vulnerability

  • CVE-2026-35040: fast-jwt Auth Bypass Vulnerability

  • CVE-2026-35039: fast-jwt Auth Bypass Vulnerability

  • CVE-2026-35041: fast-jwt DOS 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