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-2022-29217

CVE-2022-29217: PyJWT Auth Bypass Vulnerability

CVE-2022-29217 is an authentication bypass vulnerability in PyJWT that allows attackers to manipulate JWT signing algorithms. This post covers the technical details, affected versions, security impact, and mitigation.

Published: February 17, 2026

CVE-2022-29217 Overview

CVE-2022-29217 is a cryptographic vulnerability affecting PyJWT, a Python implementation of RFC 7519 for JSON Web Tokens. The vulnerability allows attackers to exploit algorithm confusion when applications use jwt.algorithms.get_default_algorithms() to specify supported signing algorithms. Since JWT tokens contain an algorithm header that attackers can manipulate, improper algorithm validation can lead to authentication bypass or token forgery.

Critical Impact

Attackers can potentially forge JWT tokens by exploiting algorithm confusion, enabling unauthorized access to protected resources and bypassing authentication mechanisms in affected applications.

Affected Products

  • PyJWT Project PyJWT (versions prior to 2.4.0)
  • Fedora Project Fedora 35
  • Fedora Project Fedora 36

Discovery Timeline

  • 2022-05-24 - CVE-2022-29217 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-29217

Vulnerability Analysis

This vulnerability falls under the category of Broken Cryptography and relates to CWE-327 (Use of a Broken or Risky Cryptographic Algorithm). The core issue stems from how PyJWT handles algorithm specification during JWT token verification. When applications use jwt.algorithms.get_default_algorithms() to accept all supported algorithms, they inadvertently open themselves to algorithm confusion attacks.

JWT tokens include an alg header that specifies which cryptographic algorithm was used to sign the token. In a secure implementation, the server should strictly enforce which algorithms it accepts. However, when an application accepts all default algorithms, an attacker can craft a token using a weaker or different algorithm than intended, potentially leading to signature bypass.

The vulnerability has a network-based attack vector, requiring no privileges or user interaction, making it remotely exploitable against vulnerable applications.

Root Cause

The root cause lies in the permissive algorithm handling when algorithms=jwt.algorithms.get_default_algorithms() is used during JWT decoding. This configuration accepts all supported algorithms rather than explicitly specifying only the expected signing algorithm. The PyJWT library correctly requires applications to specify supported algorithms, but provides a convenience function that enables insecure defaults when misused.

Attack Vector

An attacker can exploit this vulnerability by:

  1. Intercepting or observing a valid JWT token from the target application
  2. Analyzing the token structure and identifying the algorithm used
  3. Crafting a new JWT token with a manipulated alg header specifying a different algorithm
  4. Submitting the forged token to the application that uses get_default_algorithms()
  5. If successful, the application accepts the token despite using an unexpected signing algorithm

The version bump from 2.3.0 to 2.4.0 addresses this security issue:

python
)
from .jwks_client import PyJWKClient

-__version__ = "2.3.0"
+__version__ = "2.4.0"

__title__ = "PyJWT"
__description__ = "JSON Web Token implementation in Python"

Source: GitHub Commit Update

Detection Methods for CVE-2022-29217

Indicators of Compromise

  • Unusual JWT tokens with unexpected or mixed algorithm headers in application logs
  • Authentication events where token verification succeeds with algorithms that should not be supported
  • Multiple failed authentication attempts followed by successful access using modified tokens
  • JWT tokens containing alg headers that differ from the application's expected signing algorithm

Detection Strategies

  • Audit application code for usage of jwt.algorithms.get_default_algorithms() in jwt.decode() calls
  • Review dependencies using pip list or pip freeze to identify PyJWT versions below 2.4.0
  • Implement logging for JWT verification events that capture the algorithm used during token validation
  • Use static analysis tools to scan Python codebases for vulnerable PyJWT usage patterns

Monitoring Recommendations

  • Enable detailed logging for all JWT authentication events including algorithm information
  • Monitor for anomalous authentication patterns such as successful authentications from previously blocked sources
  • Set up alerts for JWT tokens that pass validation but use unexpected algorithm types
  • Track PyJWT version across all deployed applications and flag outdated instances

How to Mitigate CVE-2022-29217

Immediate Actions Required

  • Upgrade PyJWT to version 2.4.0 or later immediately across all affected systems
  • Review all JWT decoding implementations and replace get_default_algorithms() with explicit algorithm specifications
  • Audit authentication logs for any signs of algorithm confusion exploitation
  • Implement explicit algorithm whitelisting in all JWT verification code

Patch Information

The vulnerability is addressed in PyJWT version 2.4.0. Users should upgrade using pip:

bash
pip install --upgrade pyjwt>=2.4.0

The security patch was merged from GitHub Security Advisory GHSA-ffqj-6fqr-9h24. The patched release is available at the PyJWT v2.4.0 release page.

Fedora users should apply updates through their package manager as Fedora 35 and 36 have issued package announcements for this vulnerability.

Workarounds

  • Always explicitly specify accepted algorithms rather than using get_default_algorithms()
  • Restrict algorithm acceptance to only the specific algorithm(s) your application uses
  • Implement server-side validation that verifies the JWT algorithm matches expected configuration
  • Consider adding additional token validation checks beyond standard JWT verification
python
# Secure configuration example - explicitly specify algorithms
import jwt

# Instead of: jwt.decode(token, key, algorithms=jwt.algorithms.get_default_algorithms())
# Use explicit algorithm specification:
decoded = jwt.decode(
    token,
    key,
    algorithms=["RS256"]  # Explicitly specify only expected algorithm(s)
)

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

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechPyjwt

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.31%

  • 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-327
  • Technical References
  • GitHub Release v2.4.0

  • GitHub Security Advisory GHSA-ffqj-6fqr-9h24

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Vicarius Analysis on CVE-2022-29217
  • Vendor Resources
  • GitHub Commit Update
  • Related CVEs
  • CVE-2026-32597: PyJWT Information Disclosure Vulnerability

  • CVE-2024-53861: PyJWT Issuer Claim Validation DoS Flaw

  • CVE-2025-45768: PyJWT Information Disclosure 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