Skip to content

Update dependency bcrypt to v3.1.22 [SECURITY]#877

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/rubygems-bcrypt-vulnerability
Open

Update dependency bcrypt to v3.1.22 [SECURITY]#877
renovate[bot] wants to merge 1 commit intomainfrom
renovate/rubygems-bcrypt-vulnerability

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Mar 19, 2026

This PR contains the following updates:

Package Change Age Adoption Passing Confidence Diffend
bcrypt 3.1.213.1.22 age adoption passing confidence Diff

GitHub Vulnerability Alerts

CVE-2026-33306

Impact

An integer overflow in the Java BCrypt implementation for JRuby can cause zero iterations in the strengthening loop. Impacted applications must be setting the cost to 31 to see this happen.

The JRuby implementation of bcrypt-ruby (BCrypt.java) computes the key-strengthening round count as a signed 32-bit integer. When cost=31 (the maximum allowed by the gem), signed integer overflow causes the round count to become negative, and the strengthening loop executes zero iterations. This collapses bcrypt from 2^31 rounds of exponential key-strengthening to effectively constant-time computation — only the initial EksBlowfish key setup and final 64x encryption phase remain.

The resulting hash looks valid ($2a$31$...) and verifies correctly via checkpw, making the weakness invisible to the application. This issue is triggered only when cost=31 is used or when verifying a $2a$31$ hash.

Patches

This problem has been fixed in version 3.1.22

Workarounds

Set the cost to something less than 31.


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies This updates dependency files label Mar 19, 2026
@github-actions
Copy link

GitLab Pipeline Action

General information

Link to pipeline: https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2396719732

Status: Passed
Duration: 4 minutes

Job summaries

rspec: [ee]

Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/13570493880/artifacts/tmp/coverage/index.html
Test summary available at https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2396719732/test_report
Finished in 21.81 seconds (files took 13.35 seconds to load)
1317 examples, 0 failures
Line Coverage: 92.55% (4249 / 4591)
[TEST PROF INFO] Time spent in factories: 00:11.408 (37.87% of total time)

rspec: [ce]

Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/13570493877/artifacts/tmp/coverage/index.html
Test summary available at https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2396719732/test_report
Finished in 22.85 seconds (files took 12.82 seconds to load)
1270 examples, 0 failures
Line Coverage: 92.0% (4081 / 4436)
[TEST PROF INFO] Time spent in factories: 00:11.493 (37.83% of total time)

rubocop

727 files inspected, no offenses detected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies This updates dependency files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant