Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-2023-48238

CVE-2023-48238: JSON Web Token Auth Bypass Vulnerability

CVE-2023-48238 is an authentication bypass flaw in joaquimserafim json-web-token library caused by JWT algorithm confusion. Attackers can forge tokens by exploiting RS256 to HS256 confusion. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: January 28, 2026

CVE-2023-48238 Overview

CVE-2023-48238 is a JWT algorithm confusion vulnerability in the joaquimserafim/json-web-token JavaScript library. This library is used to interact with JSON Web Tokens (JWT), which are compact URL-safe means of representing claims to be transferred between two parties. The vulnerability allows attackers to bypass signature verification by exploiting the library's trust in the unverified algorithm claim within a JWT token.

Critical Impact

Attackers can forge valid JWT tokens by exploiting algorithm confusion, potentially gaining unauthorized access to protected resources and bypassing authentication controls entirely.

Affected Products

  • joaquimserafim json_web_token (Node.js package)
  • Applications using RS256 algorithm with the vulnerable json-web-token library
  • Any Node.js application relying on this library for JWT authentication

Discovery Timeline

  • 2023-11-17 - CVE-2023-48238 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2023-48238

Vulnerability Analysis

This vulnerability falls under CWE-345 (Insufficient Verification of Data Authenticity). The json-web-token library incorrectly trusts the algorithm specified within the JWT token header before the token's signature has been verified. This creates a classic JWT algorithm confusion attack scenario, where the security of asymmetric cryptography (RS256) can be undermined by switching to symmetric cryptography (HS256).

The attack requires the attacker to have access to the application's public RSA key, which in many deployments is intentionally made available or can be obtained through other means. Using this public key, the attacker can craft a malicious JWT token that specifies HS256 as the algorithm instead of RS256. When the vulnerable library processes this token, it uses the public RSA key as the HMAC secret, allowing the attacker to create validly signed tokens.

Root Cause

The root cause of this vulnerability exists in the index.js file at line 86 of the json-web-token library. At this location, the algorithm used for verifying the JWT signature is extracted directly from the JWT token's header. Since the token has not yet been verified at this point, this algorithm value should not be trusted. However, the library proceeds to use this attacker-controlled algorithm value for signature verification, enabling the algorithm confusion attack.

Attack Vector

The attack vector is network-based and requires no authentication or user interaction. An attacker can exploit this vulnerability by:

  1. Obtaining the target application's public RSA key (often publicly available)
  2. Creating a malicious JWT token with the algorithm header set to HS256 instead of RS256
  3. Signing this token using the public RSA key as the HMAC secret
  4. Submitting the crafted token to the vulnerable application

The vulnerable library will accept this token as valid because it trusts the algorithm claim from the unverified token header and uses the public RSA key (which it expects to use for RS256 verification) as the symmetric key for HS256 verification.

The attack specifically targets applications using RS256 (RSA with SHA-256) for JWT validation, which is a best practice for JWT security due to its asymmetric nature. Ironically, this makes applications following security best practices more susceptible to this particular vulnerability.

Detection Methods for CVE-2023-48238

Indicators of Compromise

  • JWT tokens with HS256 algorithm header being accepted by applications configured for RS256
  • Unexpected algorithm values in JWT token headers in application logs
  • Authentication successes from tokens that should have failed verification
  • Anomalous authorization events following JWT token submission

Detection Strategies

  • Monitor application logs for JWT tokens containing unexpected algorithm headers (HS256 when RS256 is expected)
  • Implement logging of all JWT validation attempts and alert on algorithm mismatches
  • Review dependency manifests for presence of vulnerable json-web-token library versions
  • Use software composition analysis (SCA) tools to identify vulnerable dependencies in Node.js projects

Monitoring Recommendations

  • Enable detailed JWT validation logging in applications using this library
  • Set up alerts for authentication anomalies where users gain access to resources they shouldn't have
  • Monitor for changes in JWT algorithm headers across normal traffic patterns
  • Implement runtime application self-protection (RASP) to detect JWT manipulation attempts

How to Mitigate CVE-2023-48238

Immediate Actions Required

  • Audit all Node.js applications for use of the joaquimserafim/json-web-token library
  • Review the GitHub Security Advisory for vendor-specific guidance
  • Consider migrating to a more actively maintained JWT library with proper algorithm validation
  • Implement server-side algorithm enforcement that does not rely on token header claims

Patch Information

Users should consult the GitHub Security Advisory GHSA-4xw9-cx39-r355 for the latest patch information and recommended library versions. It is critical to update to a patched version or implement workarounds to prevent algorithm confusion attacks.

Workarounds

  • Explicitly configure and enforce the expected algorithm in application code rather than accepting the token's algorithm claim
  • Implement a validation layer that rejects tokens with algorithm headers that don't match the expected algorithm
  • Consider replacing the vulnerable library with alternatives that properly handle algorithm validation (e.g., jsonwebtoken or jose)
  • Use separate key stores for different algorithm types to prevent key confusion attacks

Applications should enforce the expected algorithm at the application level rather than relying on the JWT library's default behavior. This can be accomplished by validating the algorithm header before passing the token to the library, or by using library options that enforce a specific algorithm regardless of the token's claims.

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

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechJoaquimserafim Json Web Token

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.14%

  • 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-345
  • Vendor Resources
  • GitHub Security Advisory
  • Latest CVEs
  • CVE-2025-49454: TinySalt Path Traversal Vulnerability

  • CVE-2025-48261: MultiVendorX Information Disclosure Flaw

  • CVE-2025-32119: CardGate WooCommerce SQL Injection Flaw

  • CVE-2025-26879: s2Member Plugin Reflected XSS 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