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

v3.2.0 (2026-05-13)

Full Changelog

Features:

  • Add enforce_hmac_key_length configuration option #716 - (@304)

Fixes and enhancements:

3.1.2

v3.1.2 (2025-06-28)

Full Changelog

Fixes and enhancements:

  • Avoid using the same digest across calls in JWT::JWA::Ecdsa and JWT::JWA::Rsa #697
  • Fix signing with a EC JWK #699 (@anakinj)

3.1.1

v3.1.1 (2025-06-24)

Full Changelog

Fixes and enhancements:

  • Require the algorithm to be provided when signing and verifying tokens using JWKs #695 (@anakinj)

3.1.0

v3.1.0 (2025-06-23)

Full Changelog

Features:

  • Add support for x5t header parameter for X.509 certificate thumbprint verification #669 (@hieuk09)
  • Raise an error if the ECDSA signing or verification key is not an instance of OpenSSL::PKey::EC #688 (@anakinj)
  • Allow OpenSSL::PKey::EC::Point to be used as the verification key in ECDSA #689 (@anakinj)
  • Require claims to have been verified before accessing the JWT::EncodedToken#payload #690 (@anakinj)
  • Support signing and verifying tokens using a JWK #692 (@anakinj)

3.0.0

v3.0.0 (2025-06-14)

Full Changelog

Breaking changes:

  • Require token signature to be verified before accessing payload #648 (@anakinj)
  • Drop support for the HS512256 algorithm #650 (@anakinj)
  • Remove deprecated claim verification methods #654 (@anakinj)
  • Remove dependency to rbnacl #655 (@anakinj)
  • Support only stricter base64 decoding (RFC 4648) #658 (@anakinj)
  • Custom algorithms are required to include JWT::JWA::SigningAlgorithm #660 (@anakinj)
  • Require RSA keys to be at least 2048 bits #661 (@anakinj)
  • Base64 encode and decode the k value for HMAC JWKs #662 (@anakinj)

Take a look at the upgrade guide for more details.

Features:

  • JWT::EncodedToken#verify! method that bundles signature and claim validation #647 (@anakinj)
  • Do not override the alg header if already given #659 (@anakinj)
  • Make JWK::KeyFinder compatible with JWT::EncodedToken #663 (@anakinj)

Fixes and enhancements:

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.24) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

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.6) · Repo · Changelog

Release Notes

2.0.6

2.0.6 - 2026-06-11

  • TAG: v2.0.6
  • COVERAGE: 100.00% -- 133/133 lines in 7 files
  • BRANCH COVERAGE: 100.00% -- 38/38 branches in 7 files
  • 92.86% documented

Fixed

  • Restored docs/CNAME so the generated documentation site keeps its custom domain.
  • Removed stale legacy CI workflows and duplicate extracted-stdlib gem
    declarations from generated Appraisal gemfiles.

Official Discord 👉️ Live Chat on Discord

Many paths lead to being a sponsor or a backer of this project. Are you on such a path?

OpenCollective Backers OpenCollective Sponsors Sponsor Me on Github Liberapay Goal Progress Donate on PayPal

Buy me a coffee Donate on Polar Donate to my FLOSS efforts at ko-fi.com Donate to my FLOSS efforts using Patreon

2.0.5

2.0.5 - 2026-06-07

  • TAG: v2.0.5
  • COVERAGE: 100.00% -- 133/133 lines in 7 files
  • BRANCH COVERAGE: 100.00% -- 38/38 branches in 7 files
  • 92.86% documented

Changed

  • Refreshed project scaffolding with the current kettle-jem template, including
    updated CI workflows, modular gemfiles, and development tooling floors.

Official Discord 👉️ Live Chat on Discord

Many paths lead to being a sponsor or a backer of this project. Are you on such a path?

OpenCollective Backers OpenCollective Sponsors Sponsor Me on Github Liberapay Goal Progress Donate on PayPal

Buy me a coffee Donate on Polar Donate to my FLOSS efforts at ko-fi.com Donate to my FLOSS efforts using Patreon

2.0.4

2.0.4 - 2026-05-16

  • TAG: v2.0.4
  • COVERAGE: 100.00% -- 133/133 lines in 7 files
  • BRANCH COVERAGE: 100.00% -- 38/38 branches in 7 files
  • 100.00% documented

Added

  • Incident Response Plan in IRP.md
  • SnakyHash::VERSION (Traditional Constant Location)
  • kettle-dev & kettle-test dev harnesses

Changed

  • Contributor Conenant updated to version 2.1

Fixed

  • Specs

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.12) · Repo · Changelog

Release Notes

1.1.12

1.1.12 - 2026-06-14

  • TAG: v1.1.12
  • COVERAGE: 100.00% -- 58/58 lines in 2 files
  • BRANCH COVERAGE: 0.00% -- 0/0 branches in 2 files
  • 85.19% documented

Changed

  • Retemplated repository metadata, workflows, modular gemfiles, and documentation
    scaffolding with the current kettle-jem template.

Fixed

  • Restored docs/CNAME so the generated documentation site keeps its custom domain.
  • Corrected misspelled contact metadata to use galtzo.com.

Official Discord 👉️ Live Chat on Discord

Many paths lead to being a sponsor or a backer of this project. Are you on such a path?

OpenCollective Backers OpenCollective Sponsors Sponsor Me on Github Liberapay Goal Progress Donate on PayPal

Buy me a coffee Donate on Polar Donate to my FLOSS efforts at ko-fi.com Donate to my FLOSS efforts using Patreon

1.1.11

1.1.11 - 2026-06-06

  • TAG: v1.1.11
  • COVERAGE: 100.00% -- 58/58 lines in 2 files
  • BRANCH COVERAGE: 0.00% -- 0/0 branches in 2 files
  • 85.19% documented

Added

  • Added the generated appraisal2 binstub.

Changed

  • Refreshed generated CI workflows, README support badges, gemspec development
    dependency floors, and template metadata from the current kettle-jem
    template.
  • Updated generated Appraisal2 integration to use the appraisal2-rubocop
    plugin DSL and raised the generated appraisal2 / appraisal2-rubocop
    dependency floors.

Official Discord 👉️ Live Chat on Discord

Many paths lead to being a sponsor or a backer of this project. Are you on such a path?

OpenCollective Backers OpenCollective Sponsors Sponsor Me on Github Liberapay Goal Progress Donate on PayPal

Buy me a coffee Donate on Polar Donate to my FLOSS efforts at ko-fi.com Donate to my FLOSS efforts using Patreon

1.1.10

1.1.10 - 2026-06-02

  • TAG: v1.1.10
  • COVERAGE: 100.00% -- 58/58 lines in 2 files
  • BRANCH COVERAGE: 0.00% -- 0/0 branches in 2 files
  • 85.19% documented

Added

  • StructuredMerge-managed template configuration under .structuredmerge/,
    including semantic Git diff driver settings and kettle-drift integration.
  • rubocop-gradual baseline tracking for style checks.

Changed

  • Re-templated the project with the current kettle-jem / StructuredMerge
    template.
  • Development and test dependency floors now use current template floors:
    kettle-dev 2.0.7, kettle-test 2.0.3, kettle-soup-cover 2.0.0,
    turbo_tests2 3.1.1, rubocop-lts 8.3.0, and
    rubocop-lts-rspec 1.0.3.
  • Development and test tooling now targets Ruby 2.4 or newer while the
    published runtime Ruby requirement remains Ruby 2.2 or newer.
  • RSpec setup now loads kettle-test helpers and kettle-soup-cover coverage
    bootstrap from spec/spec_helper.rb.
  • Templating dependencies now load only when K_JEM_TEMPLATING=true, with
    local StructuredMerge and Kettle workspace dependencies wired through
    SMORG_RB_DEV, KETTLE_RB_DEV, and nomono.
  • Gem metadata and packaging inventory were refreshed by the template,
    including homepage, wiki, license-file, and packaged file handling.

Removed

  • Removed the obsolete .yard_gfm_support.rb documentation hook; YARD setup now
    uses the current template-managed plugin configuration.
  • Removed obsolete CI workflows for Ruby 2.3, JRuby 9.1, TruffleRuby 23.2,
    CodeQL, framework CI, and Discord notifications.
  • Removed legacy generated binstubs in favor of the current curated
    kettle-check-eof, kettle-test, and retained documentation binstubs.

Fixed

  • logo at top of README.md

  • Fixed the Style workflow RBS validation command so CI uses the bundled rbs
    executable instead of the non-executable bin/rbs binstub.

  • Fixed the Coverage workflow so Codecov repository-registration/upload errors
    do not fail CI after local coverage reports have already been generated and
    verified.

Official Discord 👉️ Live Chat on Discord

Many paths lead to being a sponsor or a backer of this project. Are you on such a path?

OpenCollective Backers OpenCollective Sponsors Sponsor Me on Github Liberapay Goal Progress Donate on PayPal

Buy me a coffee Donate on Polar Donate to my FLOSS efforts at ko-fi.com Donate to my FLOSS efforts using Patreon

1.1.9

1.1.9 - 2025-09-02

  • TAG: v1.1.9
  • COVERAGE: 100.00% -- 118/118 lines in 8 files
  • BRANCH COVERAGE: 100.00% -- 4/4 branches in 8 files
  • 84.62% documented

Added

  • re-templated gem using kettle-dev v1.1.2
    • new binstubs for changelog, readme, commit message, & release management
    • new CI workflows
    • enhanced project documentation
  • More RBS types
  • docs site: https://version-gem.galtzo.com

Fixed

  • RBS types are more accurate

Official Discord 👉️ Live Chat on Discord

Many paths lead to being a sponsor or a backer of this project. Are you on such a path?

OpenCollective Backers OpenCollective Sponsors Sponsor Me on Github Liberapay Goal Progress Donate on PayPal

Buy me a coffee Donate on Polar Donate to my FLOSS or refugee efforts at ko-fi.com Donate to my FLOSS or refugee efforts using Patreon

1.1.8 (from changelog)

  • COVERAGE: 100.00% -- 118/118 lines in 8 files
  • BRANCH COVERAGE: 100.00% -- 4/4 branches in 8 files
  • 84.62% documented

Added

  • CITATION.cff (@pboling)
  • Cryptographically signed with new 20-year cert (@pboling)
    • expires 2045-04-29
  • Improved documentation (@pboling)
  • Addressed entire REEK list (@pboling)
  • GitLab CI, as an addition to existing GHA (@pboling)

1.1.7 (from changelog)

  • Line Coverage: 100.0% (117 / 117)
  • Branch Coverage: 100.0% (4 / 4)
  • 76.92% documented

Added

  • Support for Epoch Semantic Versioning
    • extend VersionGem::Epoch in your library's MyLib::Version module
  • Support for JRuby 10 (@pboling)
  • More documentation (@pboling)

Removed

  • Ruby 2.2 removed from CI, though technically still supported
    • can't run directly in GHA anymore

1.1.6 (from changelog)

  • Line Coverage: 100.0% (77 / 77)
  • Branch Coverage: 100.0% (2 / 2)
  • 77.78% documented

Added

  • Support for JRuby 9.1, 9.2, 9.3, 9.4, and head (@pboling)
  • Support for Truffle Ruby 22.3, 23.0, 23.1, 24.1, and head (@pboling)
  • Evergreen current latest engine release workflow (@pboling)
    • Runs ruby, truffleruby, and jruby, always latest release
  • Improved developer experience for contributors (@pboling)
  • More documentation (@pboling)
  • Switch to stone_checksums for checksum generation (@pboling)

Changed

  • Code of Conduct updated - Contributor Covenant v2.0 => v2.1 (@pboling)

1.1.5 (from changelog)

  • Line Coverage: 100.0% (77 / 77)
  • Branch Coverage: 100.0% (2 / 2)
  • 77.78% documented

Added

  • Document approach to get code coverage on your gem's version.rb file (@pboling)
  • More documentation, and yard task for documentation (@pboling)
  • Documentation of Ruby version and SemVer support (@pboling)

Fixed

  • #3 - Allow packaging without signing (@pboling)
    • to support secure linux distros which have alternate means of signing packages within their package managers
  • Code coverage tracking (@pboling)
  • Documentation of usage in gemspec via Kernel.load (@pboling)
  • Improved gemspec config (@pboling)

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.

🆕 anonymous_loader (added, 0.1.1)

🆕 auth-sanitizer (added, 0.2.2)


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
@depfu depfu Bot force-pushed the depfu/update/jwt-3.2.0 branch from 5fb60be to daf2f6b Compare June 14, 2026 12:45
@depfu depfu Bot force-pushed the depfu/update/jwt-3.2.0 branch from daf2f6b to f27a178 Compare June 19, 2026 21:25
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