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
    • 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-2024-51744

CVE-2024-51744: golang-jwt Auth Bypass Vulnerability

CVE-2024-51744 is an authentication bypass flaw in golang-jwt caused by unclear error handling that may allow invalid tokens to be accepted. This article covers the technical details, affected versions, and mitigation steps.

Updated: January 22, 2026

CVE-2024-51744 Overview

CVE-2024-51744 is an Improper Input Validation vulnerability in golang-jwt, a widely used Go implementation of JSON Web Tokens (JWT). The vulnerability stems from unclear documentation of error behavior in the ParseWithClaims function, which can lead to developers improperly checking for errors and potentially accepting invalid tokens.

The core issue arises when a token is both expired and has an invalid signature. In this scenario, ParseWithClaims returns both error codes simultaneously. If developers only check for jwt.ErrTokenExpired using error.Is, they may inadvertently ignore the embedded jwt.ErrTokenSignatureInvalid error, leading to the acceptance of tokens that should be rejected.

Critical Impact

Applications using golang-jwt v4 that improperly handle compound errors from ParseWithClaims may accept tokens with invalid signatures, potentially allowing unauthorized access or authentication bypass.

Affected Products

  • golang-jwt v4 (versions prior to 4.5.1)
  • Applications using the ParseWithClaims function with incomplete error checking

Discovery Timeline

  • 2024-11-04 - CVE CVE-2024-51744 published to NVD
  • 2024-11-05 - Last updated in NVD database

Technical Details for CVE-2024-51744

Vulnerability Analysis

This vulnerability is classified under CWE-755 (Improper Handling of Exceptional Conditions). The fundamental issue lies in how the ParseWithClaims function returns multiple errors when a JWT token fails validation for multiple reasons. The function can return compound errors containing both jwt.ErrTokenExpired and jwt.ErrTokenSignatureInvalid simultaneously.

The problem becomes critical when developers use Go's errors.Is() function to check only for token expiration. Since the error wrapping mechanism in Go allows multiple errors to be combined, checking for just one error type while ignoring others creates a security gap. An attacker could craft a token with an invalid signature but with an expired timestamp, and if the application only checks for expiration errors first, it might process the token as merely "expired" rather than "invalid."

Root Cause

The root cause is improper error handling logic in the golang-jwt v4 library combined with insufficient documentation about the compound error behavior. The ParseWithClaims function did not prioritize "dangerous" errors (like signature validation failures) over less critical ones (like expiration), allowing both to be returned simultaneously without clear guidance on proper handling order.

Attack Vector

This vulnerability is exploitable over the network. An attacker can craft a malicious JWT token with an invalid signature but valid-looking structure. If the target application checks for token expiration before signature validity (or only checks for expiration), the attacker can bypass signature verification:

  1. Attacker intercepts or crafts a JWT token
  2. Attacker modifies the token payload while also setting an expired timestamp
  3. The modified token has an invalid signature due to payload changes
  4. ParseWithClaims returns both ErrTokenExpired and ErrTokenSignatureInvalid
  5. Vulnerable application checks only for ErrTokenExpired and treats it as a recoverable error
  6. Token with invalid signature is potentially accepted or processed

The following code shows the security patch applied to parser.go:

go
// ParseWithClaims parses, validates, and verifies like Parse, but supplies a default object
// implementing the Claims interface. This provides default values which can be overridden and
// allows a caller to use their own type, rather than the default MapClaims implementation of
// Claims.
//
// Note: If you provide a custom claim implementation that embeds one of the standard claims (such
// as RegisteredClaims), make sure that a) you either embed a non-pointer version of the claims or
// b) if you are using a pointer, allocate the proper memory for it before passing in the overall
// claims, otherwise you might run into a panic.
func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyfunc) (*Token, error) {
	token, parts, err := p.ParseUnverified(tokenString, claims)
	if err != nil {

Source: GitHub Commit Update

Detection Methods for CVE-2024-51744

Indicators of Compromise

  • Authentication logs showing accepted tokens that should have failed validation
  • Unusual patterns of token-based authentication attempts with expired tokens
  • Application behavior suggesting bypassed signature verification

Detection Strategies

  • Audit application code for improper error handling in JWT validation logic
  • Search for code patterns that only check for jwt.ErrTokenExpired without checking jwt.ErrTokenSignatureInvalid
  • Review dependency manifests for golang-jwt versions prior to 4.5.1
  • Implement unit tests that verify proper rejection of tokens with invalid signatures

Monitoring Recommendations

  • Enable verbose logging for JWT validation failures to capture all error types returned
  • Monitor for authentication anomalies where tokens are accepted despite multiple validation failures
  • Set up dependency scanning to alert on vulnerable golang-jwt versions in your codebase

How to Mitigate CVE-2024-51744

Immediate Actions Required

  • Upgrade golang-jwt to version 4.5.1 or later immediately
  • Review all code paths that use ParseWithClaims to ensure proper error handling
  • Prioritize checking for signature validation errors before other error types
  • Test token validation logic with tokens that have both expired timestamps and invalid signatures

Patch Information

A fix has been back-ported with error handling logic from the v5 branch to the v4 branch. In this updated logic, the ParseWithClaims function immediately returns in "dangerous" situations (e.g., an invalid signature), limiting combined errors only to situations where the signature is valid but further validation failed.

The fix is available in version 4.5.1. Note that this changes the behavior of the ParseWithClaims function and may not be 100% backwards compatible. For more details, see the GitHub Security Advisory GHSA-29wx-vh33-7x7r.

Workarounds

  • If upgrading is not immediately possible, ensure error checking prioritizes dangerous errors first
  • Implement custom wrapper functions around ParseWithClaims that properly check for all error types
  • Check for jwt.ErrTokenSignatureInvalid before checking for jwt.ErrTokenExpired
  • Use errors.Is() to check for multiple error types in the correct priority order
go
// Recommended error checking pattern for vulnerable versions
token, err := parser.ParseWithClaims(tokenString, claims, keyFunc)
if err != nil {
    // Always check dangerous errors first
    if errors.Is(err, jwt.ErrTokenSignatureInvalid) {
        // Reject immediately - signature is invalid
        return nil, fmt.Errorf("invalid token signature: %w", err)
    }
    if errors.Is(err, jwt.ErrTokenExpired) {
        // Handle expiration after confirming signature is valid
        return nil, fmt.Errorf("token expired: %w", err)
    }
    // Handle other errors
    return nil, err
}

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

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechGolang Jwt

  • SeverityLOW

  • CVSS Score3.1

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-755
  • Technical References
  • GitHub Commit Update

  • GitHub Security Advisory GHSA-29wx-vh33-7x7r
  • Related CVEs
  • CVE-2025-30204: golang-jwt DoS Vulnerability Alert
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