Skip to content

🚨 [security] [ruby] Update jwt 2.10.3 → 3.2.0 (major)#1173

Open
depfu[bot] wants to merge 1 commit into
masterfrom
depfu/update/jwt-3.2.0
Open

🚨 [security] [ruby] Update jwt 2.10.3 → 3.2.0 (major)#1173
depfu[bot] wants to merge 1 commit into
masterfrom
depfu/update/jwt-3.2.0

Conversation

@depfu

@depfu depfu Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

🚨 Your current dependencies have known security vulnerabilities 🚨

This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!


Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

↗️ jwt (indirect, 2.10.3 → 3.2.0) · Repo · Changelog

Security Advisories 🚨

🚨 ruby-jwt: Empty-key HMAC bypass; cross-language sibling of CVE-2026-44351

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 no raise InvalidKeyError if key.empty? precondition exists in the HMAC algorithm.

JWT.decode(token, "", true, algorithm: 'HS256')
  -> JWA::Hmac.verify(verification_key: "", ...)
  -> OpenSSL::HMAC.digest('SHA256', "", signing_input) == signature

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.

JWT.decode(token, nil, true, algorithms: ['HS256']) { |_h| "" }
  -> find_key returns ""               # "" && !Array("").empty? == true
  -> JWA::Hmac.verify(verification_key: "", ...)
  -> verifies

Common application patterns that produce the unsafe value: redis.get("kid:#{kid}").to_s, ORM string columns with default: '', 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_length option 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:)

Release Notes

3.2.0

More info than we can show here.

3.1.2

More info than we can show here.

3.1.1

More info than we can show here.

3.1.0

More info than we can show here.

3.0.0

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ oauth2 (indirect, 2.0.9 → 2.0.20) · Repo · Changelog

Release Notes

2.0.20

More info than we can show here.

2.0.19

More info than we can show here.

2.0.18

More info than we can show here.

2.0.17

More info than we can show here.

2.0.16

More info than we can show here.

2.0.15

More info than we can show here.

2.0.14

More info than we can show here.

2.0.13

More info than we can show here.

2.0.12

More info than we can show here.

2.0.11

More info than we can show here.

2.0.10

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ snaky_hash (indirect, 2.0.1 → 2.0.4) · Repo · Changelog

Release Notes

2.0.4

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ version_gem (indirect, 1.1.4 → 1.1.10) · Repo · Changelog

Release Notes

1.1.9

More info than we can show here.

1.1.8 (from changelog)

More info than we can show here.

1.1.7 (from changelog)

More info than we can show here.

1.1.6 (from changelog)

More info than we can show here.

1.1.5 (from changelog)

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

🆕 auth-sanitizer (added, 0.1.4)


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu Bot added the depfu label May 18, 2026
@depfu depfu Bot force-pushed the depfu/update/jwt-3.2.0 branch from 6426368 to 5fb60be Compare June 3, 2026 00:10
@depfu depfu Bot changed the title 🚨 [security] [ruby] Update jwt 2.10.1 → 3.2.0 (major) 🚨 [security] [ruby] Update jwt 2.10.3 → 3.2.0 (major) Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants