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-2021-46743

CVE-2021-46743: Firebase PHP-JWT Auth Bypass Vulnerability

CVE-2021-46743 is an authentication bypass flaw in Firebase PHP-JWT caused by algorithm confusion when multiple key types are loaded. This article covers the technical details, affected versions, and mitigation strategies.

Published: February 25, 2026

CVE-2021-46743 Overview

CVE-2021-46743 is an algorithm-confusion vulnerability in Firebase PHP-JWT before version 6.0.0. The flaw exists via the kid (Key ID) header when multiple types of keys are loaded in a key ring. This allows an attacker to forge tokens that validate under the incorrect key, potentially leading to authentication bypass and token forgery attacks. The vulnerability is classified as CWE-843 (Type Confusion), where the library may incorrectly process cryptographic material due to ambiguous algorithm selection.

Critical Impact

Attackers can exploit this algorithm-confusion issue to forge valid JWT tokens, bypassing authentication mechanisms and potentially gaining unauthorized access to protected resources.

Affected Products

  • Google Firebase PHP-JWT versions prior to 6.0.0

Discovery Timeline

  • 2022-03-29 - CVE CVE-2021-46743 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-46743

Vulnerability Analysis

This vulnerability stems from a type confusion condition in how Firebase PHP-JWT handles cryptographic key selection when multiple key types exist within a key ring. The root issue lies in the library's processing of the kid (Key ID) header parameter in JWT tokens combined with asymmetric/symmetric algorithm selection.

In a typical RS256/HS256 confusion attack, the library may be tricked into verifying an RS256-signed token using a public key as if it were an HS256 symmetric secret. When an application loads both RSA public keys and HMAC secrets into the same key ring, an attacker can craft a malicious token specifying HS256 as the algorithm while using the RS256 public key (which is often publicly available) as the HMAC secret. Since the public key is known, the attacker can generate valid HMAC signatures that the library incorrectly validates.

The network attack vector allows remote exploitation without authentication. When successfully exploited, this vulnerability enables attackers to forge authentication tokens that appear valid to the application, potentially leading to complete authentication bypass.

Root Cause

The vulnerability is caused by insufficient validation of the relationship between the specified algorithm in the JWT header and the type of cryptographic key retrieved from the key ring using the kid parameter. When the library looks up a key by its kid, it fails to properly enforce that the key type matches the algorithm being used for verification. This type confusion (CWE-843) allows RSA public keys to be misused as HMAC symmetric secrets.

Attack Vector

The attack exploits the network-accessible JWT verification mechanism. An attacker crafts a JWT with the following characteristics:

  1. Sets the alg header to HS256 instead of RS256
  2. Sets the kid header to reference a known RSA public key in the application's key ring
  3. Signs the token using the RSA public key as an HMAC secret

Since RSA public keys are often distributed or obtainable, the attacker can compute a valid HS256 signature. When the vulnerable library processes this token, it retrieves the RSA public key based on the kid, but treats it as an HMAC secret due to the alg header specifying HS256. The signature verification then succeeds, allowing forged tokens to be accepted as valid.

For detailed technical analysis of this vulnerability, refer to the GitHub Issue Discussion.

Detection Methods for CVE-2021-46743

Indicators of Compromise

  • JWT tokens with HS256 algorithm that reference keys originally intended for RS256 operations
  • Unexpected authentication events with valid tokens from unknown sources
  • Anomalous kid header values in JWT tokens that don't match expected asymmetric key identifiers

Detection Strategies

  • Monitor application logs for JWT verification failures followed by unexpected successful authentications
  • Implement application-level logging to track the algorithm (alg) and key ID (kid) used in all JWT operations
  • Deploy web application firewall rules to detect tokens with suspicious algorithm/key combinations

Monitoring Recommendations

  • Audit authentication logs for sessions established via JWT tokens with mismatched algorithm expectations
  • Monitor dependency management systems (Composer) for vulnerable PHP-JWT versions
  • Review key ring configurations to identify applications using mixed key types that may be susceptible

How to Mitigate CVE-2021-46743

Immediate Actions Required

  • Upgrade Firebase PHP-JWT to version 6.0.0 or later immediately
  • Review and audit all JWT verification implementations using PHP-JWT
  • Ensure algorithm whitelisting is properly configured to prevent algorithm confusion
  • Avoid loading multiple key types into the same key ring where possible

Patch Information

The vulnerability has been addressed in Firebase PHP-JWT version 6.0.0. Organizations should update their Composer dependencies to pull the patched version. The fix implements stricter validation to ensure the key type matches the specified algorithm during token verification.

For additional context on the vulnerability and remediation, see the GitHub Issue Discussion.

Workarounds

  • Explicitly specify the allowed algorithms when calling the decode function, rather than relying on the token's alg header
  • Segregate key rings by algorithm type, ensuring RSA keys and HMAC secrets are never loaded into the same key ring
  • Implement application-level validation to verify the algorithm matches expectations before passing tokens to the library
bash
# Update Firebase PHP-JWT via Composer
composer require firebase/php-jwt:^6.0.0

# Verify installed version
composer show firebase/php-jwt

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

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechGoogle Firebase Php Jwt

  • SeverityCRITICAL

  • CVSS Score9.1

  • EPSS Probability0.79%

  • 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-843
  • Technical References
  • GitHub Issue Discussion
  • Latest CVEs
  • CVE-2026-35467: Browser API Key Information Disclosure

  • CVE-2026-35466: cveInterface.js XSS Vulnerability

  • CVE-2026-30252: ZenShare Suite XSS Vulnerability

  • CVE-2026-30251: ZenShare Suite v17.0 XSS 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