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
Copy Markdown
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
Copy Markdown

github-actions bot commented Mar 19, 2026

No description provided.

@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
@renovate renovate bot deleted the renovate/rubygems-bcrypt-vulnerability branch March 27, 2026 01:44
@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 8b0cfe8 to b9569c1 Compare March 30, 2026 20:37
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