Skip to main content
EPSS 0.4%top 72%

CVE-2026-45363: CWE-287: Improper Authentication in jwt ruby-jwt

0
Critical
VulnerabilityCVE-2026-45363cvecve-2026-45363cwe-287cwe-326cwe-1391
Published: 07/14/2026 (07/14/2026, 21:32:26 UTC)
Source: CVE Database V5
Vendor/Project: jwt
Product: ruby-jwt

Description

ruby-jwt is a Ruby implementation of the RFC 7519 OAuth JSON Web Token standard. Prior to 2.10.3 and 3.2.0, JWT.decode(token, '', true, algorithm: 'HS256') accepts an attacker-forged token because OpenSSL::HMAC.digest('SHA256', '', payload) returns a valid digest under an empty key and no empty-key precondition exists in the HMAC algorithm. The same path is reached when a keyfinder block or key_finder: argument returns an empty string, nil, or an array containing nil for an unknown key, affecting HS256, HS384, and HS512 verification through JWT.decode and JWT::EncodedToken#verify_signature!. This issue is fixed in versions 2.10.3 and 3.2.0.

CVSS v3.1

Score 9.1critical

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Affected software

jwt

ruby-jwt

Affected versions
<2.10.3>=3.0.0 <3.2.0
ruby-jwt
pkg:gem/ruby-jwt
Affected versions
<2.10.3>=3.0.0 <3.2.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/21/2026, 22:44:09 UTC

Technical Analysis

The ruby-jwt library, implementing RFC 7519 JSON Web Tokens, improperly authenticates tokens when the HMAC key is empty or nil. Specifically, prior to versions 2.10.3 and 3.2.0, JWT.decode(token, '', true, algorithm: 'HS256') accepts attacker-forged tokens because OpenSSL::HMAC.digest with an empty key returns a valid digest and no check prevents empty keys. This affects HS256, HS384, and HS512 algorithms and occurs when the keyfinder returns empty or nil values. The vulnerability allows bypassing signature verification, compromising token integrity and authentication.

Potential Impact

An attacker can forge JWT tokens that are accepted as valid by vulnerable ruby-jwt versions, leading to unauthorized access and potential privilege escalation. The vulnerability impacts confidentiality and integrity of authentication mechanisms relying on these tokens. The CVSS score of 9.1 reflects a critical severity with network attack vector, no privileges required, and no user interaction needed.

Mitigation Recommendations

A fix is available in ruby-jwt versions 2.10.3 and 3.2.0. Users should upgrade to these versions or later to remediate this vulnerability. Since this is a library, ensure all dependent applications update their ruby-jwt dependency accordingly. The vendor manages remediation for the cloud-hosted service if applicable; check vendor advisories for confirmation.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-05-12T00:51:29.085Z
Cvss Version
3.1
State
PUBLISHED
Is Cloud Service
true

Threat ID: 6a56aea068715ace4342b0c5

Added to database: 07/14/2026, 21:48:16 UTC

Last enriched: 07/21/2026, 22:44:09 UTC

Last updated: 10/13/2026, 06:48:17 UTC

Views: 352

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses