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-2024-54150

CVE-2024-54150: cjwt JWT Auth Bypass Vulnerability

CVE-2024-54150 is an authentication bypass flaw in cjwt, a C JSON Web Token library, caused by algorithm confusion that allows attackers to forge tokens. This article covers the technical details, affected versions, and mitigation.

Published: April 8, 2026

CVE-2024-54150 Overview

CVE-2024-54150 is an Authentication Bypass vulnerability affecting cjwt, a C JSON Web Token (JWT) implementation developed by xmidt-org. The vulnerability stems from algorithm confusion, which occurs when the system improperly verifies the type of signature used during JWT validation. This allows attackers to exploit the lack of distinction between symmetric and asymmetric signing methods, potentially bypassing authentication mechanisms entirely.

Critical Impact

Attackers can craft malicious JWTs that bypass signature verification by exploiting algorithm confusion, leading to unauthorized access to protected resources and potential full authentication bypass.

Affected Products

  • cjwt versions prior to 2.3.0
  • Applications using cjwt for JWT verification with asymmetric algorithms (RS256, ES256, PS256)
  • Systems that do not explicitly restrict algorithm types during token verification

Discovery Timeline

  • December 19, 2024 - CVE-2024-54150 published to NVD
  • December 20, 2024 - Last updated in NVD database

Technical Details for CVE-2024-54150

Vulnerability Analysis

The algorithm confusion vulnerability in cjwt arises from the library's failure to properly differentiate between HMAC-signed tokens (symmetric) and RSA/EC/PS-signed tokens (asymmetric) during the verification process. When an application expects asymmetric algorithm tokens (such as RS256), an attacker can craft a token with the alg header field set to HS256. The vulnerable library then mistakenly uses the public key—which is often publicly available—as the HMAC secret key for verification.

This attack is particularly dangerous because for RSA-based systems, the key can be computed from a few signatures. For Elliptic Curve (EC) implementations, two potential keys can be recovered from just one signature. This makes the attack highly practical in real-world scenarios where public keys are exposed through JWKS endpoints or embedded in application configurations.

Root Cause

The root cause is classified under CWE-347 (Improper Verification of Cryptographic Signature). The cjwt library did not enforce algorithm type restrictions during JWT verification, allowing tokens signed with symmetric algorithms to be verified against asymmetric key material. The library lacked a mechanism to explicitly specify which algorithm families were permitted, enabling the algorithm substitution attack.

Attack Vector

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

  1. Obtaining the target application's public key (often publicly available via JWKS endpoints)
  2. Crafting a JWT with the alg header set to HS256 instead of the expected asymmetric algorithm
  3. Signing the forged JWT using the public key as the HMAC secret
  4. Submitting the malicious token to the application, which incorrectly validates it

The following code shows the security patch that introduces the OPT_ALLOW_ONLY_HS_ALG flag to mitigate this vulnerability:

c
  */
 #define OPT_ALLOW_ANY_TYP (1 << 2)
 
+/* If you specify OPT_ALLOW_ONLY_HS_ALG as part of the options bitmask you
+ * are allowing only the use of HMAC-SHA algorithms (HS256, HS384, HS512).
+ * Otherwise only public key algorithms are allowed.
+ *
+ * Symmetric algorithms and the unknown key type passed in pose a security
+ * risk since an attacker can treate the provided public key as the secret
+ * key and sign their own JWTs with the public key as a symmetric key.
+ */
+#define OPT_ALLOW_ONLY_HS_ALG (1 << 3)
 
 /*----------------------------------------------------------------------------*/
 /*                               Data Structures                              */

Source: GitHub Commit Details

Detection Methods for CVE-2024-54150

Indicators of Compromise

  • JWT tokens with mismatched algorithm headers (e.g., HS256 tokens submitted to endpoints expecting RS256)
  • Authentication logs showing successful validation of tokens with unexpected algorithm types
  • Anomalous access patterns from users with tokens that should have failed signature verification

Detection Strategies

  • Implement logging to capture the alg header value of all incoming JWT tokens and alert on unexpected algorithm types
  • Monitor for authentication events where token algorithm differs from the configured expected algorithm
  • Deploy application-layer inspection to detect JWT manipulation attempts at the network perimeter
  • Review audit logs for successful authentications with unusual token characteristics

Monitoring Recommendations

  • Enable verbose JWT validation logging in applications using cjwt to capture algorithm metadata
  • Set up alerts for any JWT verification attempts using symmetric algorithms when asymmetric algorithms are expected
  • Monitor JWKS endpoint access patterns for reconnaissance activity that may precede exploitation

How to Mitigate CVE-2024-54150

Immediate Actions Required

  • Upgrade cjwt to version 2.3.0 or later immediately
  • Audit all applications using cjwt to identify exposure to this vulnerability
  • Review authentication logs for signs of exploitation attempts
  • Implement additional validation layers to verify expected algorithm types before token processing

Patch Information

The vulnerability has been addressed in cjwt version 2.3.0. The fix introduces the OPT_ALLOW_ONLY_HS_ALG option flag that explicitly controls which algorithm families are permitted during JWT verification. When this flag is not set, only public key algorithms are allowed, preventing the algorithm confusion attack. The security patch is available via the GitHub commit. Additional details are available in the GitHub Security Advisory.

Workarounds

  • There are no known workarounds for this vulnerability; upgrading to version 2.3.0 is the only remediation
  • As a defense-in-depth measure, implement application-level algorithm validation before passing tokens to cjwt
  • Consider implementing additional authentication factors while upgrade is pending
  • Restrict network access to affected services until patching is complete
bash
# Update cjwt to the patched version
# Using package manager or building from source
git clone https://github.com/xmidt-org/cjwt.git
cd cjwt
git checkout v2.3.0
mkdir build && cd build
cmake ..
make && sudo make install

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

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechCjwt

  • SeverityHIGH

  • CVSS Score8.7

  • EPSS Probability0.06%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-347
  • Technical References
  • GitHub Commit Details

  • GitHub Security Advisory
  • Latest CVEs
  • CVE-2025-70797: LimeSurvey XSS Vulnerability

  • CVE-2025-30650: Juniper Junos OS Auth Bypass Vulnerability

  • CVE-2026-35471: Goshs Path Traversal Vulnerability

  • CVE-2026-35393: Goshs Path Traversal 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