Update dependency jwt to v3 [SECURITY]#1583
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
Contributor
|
Reason for tests to fail is not a JWT issue itself — the problem is that billing_secret defaults to ''. JWT 3.x now correctly rejects empty HMAC keys. We should either return nil and fail fast or provide a proper test config secret. |
758e12c to
bd4c7d8
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This PR contains the following updates:
2.10.2→3.2.0ruby-jwt: Empty-key HMAC bypass; cross-language sibling of CVE-2026-44351
CVE-2026-45363 / GHSA-c32j-vqhx-rx3x
More information
Details
JWT.decode(token, '', true, algorithm: 'HS256')accepts an attacker-forged token.OpenSSL::HMAC.digest('SHA256', '', payload)returns a valid digest under an empty key, and noraise InvalidKeyError if key.empty?precondition exists in the HMAC algorithm.The same path is reached when a keyfinder block or key_finder: argument returns "", nil, or an
array containing nil for an unknown key. JWT::Decode#find_key only rejects literal nil and empty
arrays, and JWT::JWA::Hmac silently coerces nil to "" (signing_key ||= '') before signing.
Common application patterns that produce the unsafe value:
redis.get("kid:#{kid}").to_s, ORM string columns withdefault: '',ENV['SECRET'] || '', Hash.new('')lookups, [primary, fallback] where fallback may be nil. Applications passing a non-empty static key:, or whose keyfinder returns nil / raises on miss, are not affected.The existing
enforce_hmac_key_lengthoption would block this but defaults to false. On OpenSSL ≥ 3.5 the empty-key HMAC.digest call no longer raises, so the OpenSSL-3.0 rescue in JWA::Hmac#sign does not fire.Affects HS256/HS384/HS512 via both JWT.decode (positional key and block keyfinder) and
JWT::EncodedToken#verify_signature!(key_finder:)Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
jwt/ruby-jwt (jwt)
v3.2.0Compare Source
Full Changelog
Features:
enforce_hmac_key_lengthconfiguration option #716 - (@304)Fixes and enhancements:
niland empty HMAC keys when signing and verifying (CVE-2026-45363 / GHSA-c32j-vqhx-rx3x)v3.1.2Compare Source
Full Changelog
Fixes and enhancements:
v3.1.1Compare Source
Full Changelog
Fixes and enhancements:
v3.1.0Compare Source
Full Changelog
Fixes and enhancements:
v3.0.0Compare Source
Full Changelog
Features:
OpenSSL::PKey::EC#688 (@anakinj)OpenSSL::PKey::EC::Pointto be used as the verification key in ECDSA #689 (@anakinj)JWT::EncodedToken#payload#690 (@anakinj)v2.10.3: jwt-2.10.3Compare Source
v2.10.3 (2026-05-22)
Full Changelog
Fixes and enhancements:
niland empty HMAC keys when signing and verifying (CVE-2026-45363 / GHSA-c32j-vqhx-rx3x) #725 (@royzwambag)Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.