CVE-2026-45363: CWE-287: Improper Authentication in jwt ruby-jwt
A critical authentication vulnerability exists in the ruby-jwt library prior to versions 2.10.3 and 3.2.0. The issue allows attacker-forged tokens to be accepted when decoding JWT tokens using the HS256, HS384, or HS512 algorithms with an empty key or when the key finder returns an empty or nil value. This occurs because OpenSSL::HMAC.digest returns a valid digest with an empty key, and no check prevents this condition. The vulnerability is fixed in ruby-jwt versions 2.10.3 and 3.2.0.
AI Analysis
Technical Summary
The ruby-jwt library, a Ruby implementation of the RFC 7519 OAuth JSON Web Token standard, contains an improper authentication vulnerability (CWE-287) in versions prior to 2.10.3 and 3.2.0. When decoding tokens with JWT.decode(token, '', true, algorithm: 'HS256'), the library accepts attacker-forged tokens due to OpenSSL::HMAC.digest('SHA256', '', payload) producing a valid digest with an empty key and the absence of an empty-key precondition check. This flaw also occurs 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 signature verification paths. The vulnerability allows attackers to bypass signature verification, compromising authentication integrity. The issue is resolved in versions 2.10.3 and 3.2.0.
Potential Impact
Successful exploitation allows attackers to forge JWT tokens that are accepted as valid by the ruby-jwt library, bypassing authentication controls. This leads to a complete compromise of authentication integrity (high confidentiality and integrity impact) without affecting availability. The CVSS 3.1 score is 9.1 (critical), reflecting network attack vector, low attack complexity, no privileges required, no user interaction, and high impact on confidentiality and integrity.
Mitigation Recommendations
A fix is available in ruby-jwt versions 2.10.3 and 3.2.0. Users should upgrade to at least these versions to remediate the vulnerability. Since this is a cloud-hosted service library, the vendor manages remediation for cloud services using this library. Check the vendor advisory or official sources for confirmation and further guidance. No additional mitigations are specified.
CVE-2026-45363: CWE-287: Improper Authentication in jwt ruby-jwt
Description
A critical authentication vulnerability exists in the ruby-jwt library prior to versions 2.10.3 and 3.2.0. The issue allows attacker-forged tokens to be accepted when decoding JWT tokens using the HS256, HS384, or HS512 algorithms with an empty key or when the key finder returns an empty or nil value. This occurs because OpenSSL::HMAC.digest returns a valid digest with an empty key, and no check prevents this condition. The vulnerability is fixed in ruby-jwt versions 2.10.3 and 3.2.0.
CVSS v3.1
Score 9.1critical
Affected software
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, a Ruby implementation of the RFC 7519 OAuth JSON Web Token standard, contains an improper authentication vulnerability (CWE-287) in versions prior to 2.10.3 and 3.2.0. When decoding tokens with JWT.decode(token, '', true, algorithm: 'HS256'), the library accepts attacker-forged tokens due to OpenSSL::HMAC.digest('SHA256', '', payload) producing a valid digest with an empty key and the absence of an empty-key precondition check. This flaw also occurs 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 signature verification paths. The vulnerability allows attackers to bypass signature verification, compromising authentication integrity. The issue is resolved in versions 2.10.3 and 3.2.0.
Potential Impact
Successful exploitation allows attackers to forge JWT tokens that are accepted as valid by the ruby-jwt library, bypassing authentication controls. This leads to a complete compromise of authentication integrity (high confidentiality and integrity impact) without affecting availability. The CVSS 3.1 score is 9.1 (critical), reflecting network attack vector, low attack complexity, no privileges required, no user interaction, and high impact on confidentiality and integrity.
Mitigation Recommendations
A fix is available in ruby-jwt versions 2.10.3 and 3.2.0. Users should upgrade to at least these versions to remediate the vulnerability. Since this is a cloud-hosted service library, the vendor manages remediation for cloud services using this library. Check the vendor advisory or official sources for confirmation and further guidance. No additional mitigations are specified.
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
- Remediation Level
- null
- Is Cloud Service
- true
Threat ID: 6a56aea068715ace4342b0c5
Added to database: 07/14/2026, 21:48:16 UTC
Last enriched: 07/14/2026, 22:24:44 UTC
Last updated: 07/15/2026, 03:08:13 UTC
Views: 28
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.