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-51774

CVE-2023-51774: JSON::JWT Ruby Gem Auth Bypass Vulnerability

CVE-2023-51774 is an authentication bypass flaw in the JSON::JWT Ruby gem that allows attackers to bypass identity checks via sign/encryption confusion. This article covers technical details, affected versions, and mitigations.

Published: January 28, 2026

CVE-2023-51774 Overview

CVE-2023-51774 is an authentication bypass vulnerability affecting the json-jwt (JSON::JWT) gem version 1.16.3 for Ruby. The vulnerability enables attackers to bypass identity checks through a sign/encryption confusion attack, where JSON Web Encryption (JWE) can be exploited to bypass the JSON::JWT.decode function.

Critical Impact

This vulnerability allows attackers to bypass authentication and identity verification mechanisms in Ruby applications that rely on the json-jwt gem for JWT processing, potentially leading to unauthorized access to protected resources and sensitive data.

Affected Products

  • json-jwt gem version 1.16.3 for Ruby
  • Applications using JSON::JWT for token validation
  • Ruby-based authentication systems implementing JWT verification

Discovery Timeline

  • 2024-02-29 - CVE-2023-51774 published to NVD
  • 2025-05-08 - Last updated in NVD database

Technical Details for CVE-2023-51774

Vulnerability Analysis

This vulnerability represents a cryptographic confusion attack where the json-jwt library fails to properly distinguish between signed tokens (JWS) and encrypted tokens (JWE). When an application expects a signed JWT token but receives a specially crafted JWE token instead, the JSON::JWT.decode function may incorrectly process the token, bypassing signature verification entirely.

The attack exploits a fundamental design flaw in how the library handles different JWT types. By crafting a JWE token that the library misinterprets, an attacker can forge identity claims without possessing the signing key. This type of confusion attack is particularly dangerous because it undermines the core security guarantees of JWT-based authentication systems.

Root Cause

The root cause of CVE-2023-51774 lies in improper access control (CWE-284) within the token type validation logic. The JSON::JWT.decode function does not adequately verify that the token type matches what the application expects, allowing encrypted tokens to be processed in contexts where signed tokens are required.

Attack Vector

The attack requires local access to craft and submit malicious tokens to a vulnerable application. An attacker would construct a JWE token containing forged identity claims and present it to an endpoint expecting a signed JWT. The vulnerable library processes this token without proper type validation, accepting the forged claims as legitimate.

The attack flow involves:

  1. Identifying an application using the vulnerable json-jwt gem for authentication
  2. Crafting a JWE token with malicious identity claims
  3. Submitting the crafted token to bypass the JSON::JWT.decode verification
  4. Gaining unauthorized access through the bypassed identity check

Technical details and proof-of-concept information can be found in the GitHub PoC Repository.

Detection Methods for CVE-2023-51774

Indicators of Compromise

  • Unexpected JWE tokens appearing in authentication logs where JWS tokens are expected
  • Authentication successes with tokens that have unusual header structures
  • Anomalous token processing patterns in application logs
  • Users gaining access to resources without proper authorization

Detection Strategies

  • Monitor JWT token headers for unexpected alg and enc values in authentication flows
  • Implement logging to detect tokens with JWE structure being processed as JWS tokens
  • Review authentication logs for successful logins with malformed or unexpected token types
  • Deploy runtime application security monitoring to detect confusion attack patterns

Monitoring Recommendations

  • Enable detailed logging of JWT processing including token type identification
  • Set up alerts for authentication anomalies where token structure doesn't match expected patterns
  • Monitor dependency usage to identify applications using json-jwt gem version 1.16.3
  • Implement security information and event management (SIEM) rules for JWT manipulation attempts

How to Mitigate CVE-2023-51774

Immediate Actions Required

  • Update the json-jwt gem to the latest patched version immediately
  • Audit all applications using json-jwt for JWT authentication
  • Implement explicit token type validation before processing JWTs
  • Review authentication logs for potential exploitation attempts

Patch Information

Organizations should update the json-jwt gem to a version that addresses this sign/encryption confusion vulnerability. Check the GitHub PoC Repository for specific version information and remediation guidance from the maintainers.

Workarounds

  • Implement explicit checks to verify token type (JWS vs JWE) before calling decode functions
  • Add application-level validation to ensure only expected token formats are accepted
  • Consider using alternative JWT libraries that properly handle token type discrimination
  • Implement additional authentication factors to reduce reliance on JWT validation alone
bash
# Check your Gemfile.lock for vulnerable json-jwt version
grep -E "json-jwt" Gemfile.lock

# Update to the latest json-jwt version
bundle update json-jwt

# Verify the updated version
bundle show json-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/TechJson Jwt

  • SeverityHIGH

  • CVSS Score8.4

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-284
  • Technical References
  • GitHub PoC Repository
  • 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