CVE-2026-45363: CWE-287: Improper Authentication in jwt 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
Affected software
jwt
ruby-jwt
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
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.
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.