Skip to content

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

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

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

Conversation

@renovate

@renovate renovate Bot commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
bcrypt 3.1.193.1.22 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


bcrypt-ruby has an Integer Overflow that Causes Zero Key-Strengthening Iterations at Cost=31 on JRuby

CVE-2026-33306 / GHSA-f27w-vcwj-c954

More information

Details

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.

Severity

  • CVSS Score: 4.5 / 10 (Medium)
  • Vector String: CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:U

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • ""
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

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 enabled auto-merge (squash) March 19, 2026 20:43
@renovate renovate Bot changed the title Update dependency bcrypt to v3.1.22 [SECURITY] Update dependency bcrypt to v3.1.22 [SECURITY] - autoclosed Mar 27, 2026
@renovate renovate Bot closed this Mar 27, 2026
auto-merge was automatically disabled March 27, 2026 01:18

Pull request was closed

@renovate renovate Bot deleted the renovate/rubygems-bcrypt-vulnerability branch March 27, 2026 01:18
@renovate renovate Bot changed the title Update dependency bcrypt to v3.1.22 [SECURITY] - autoclosed Update dependency bcrypt to v3.1.22 [SECURITY] Mar 30, 2026
@renovate renovate Bot reopened this Mar 30, 2026
@renovate renovate Bot force-pushed the renovate/rubygems-bcrypt-vulnerability branch 2 times, most recently from 1baedc9 to 6adbc99 Compare March 30, 2026 21:36
@renovate renovate Bot enabled auto-merge (squash) April 1, 2026 09:44
@renovate renovate Bot force-pushed the renovate/rubygems-bcrypt-vulnerability branch 2 times, most recently from 6303457 to 84c9156 Compare April 1, 2026 10:01
@renovate renovate Bot changed the title Update dependency bcrypt to v3.1.22 [SECURITY] Update dependency bcrypt to v3.1.22 [SECURITY] - autoclosed Apr 27, 2026
@renovate renovate Bot closed this Apr 27, 2026
auto-merge was automatically disabled April 27, 2026 17:53

Pull request was closed

@renovate renovate Bot changed the title Update dependency bcrypt to v3.1.22 [SECURITY] - autoclosed Update dependency bcrypt to v3.1.22 [SECURITY] Apr 27, 2026
@renovate renovate Bot reopened this Apr 27, 2026
@renovate renovate Bot force-pushed the renovate/rubygems-bcrypt-vulnerability branch 2 times, most recently from 84c9156 to 8068834 Compare April 27, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants