GHSA-f27w-vcwj-c954 · 深刻度: medium · エコシステム: rubygems — bcrypt-ruby has an Integer Overflow that Causes Zero Key-Strengthening Iterations at Cost=31 on JRuby
bcrypt-ruby is a Ruby binding for the OpenBSD bcrypt() password hashing algorithm. Prior to version 3.1.22, 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. This problem has been fixed in version 3.1.22. As a workaround, set the cost to something less than 31.
総合評価: CVE-2026-33306 は低リスク(22.9/100)。CVSS 深刻度は中。悪用される可能性が高い(EPSS 0.23%、13 パーセンタイル) 推奨対応: 悪用情報と EPSS の推移を監視し、必要に応じて優先度を見直してください。
リスクは変動します。再評価に基づき、本ページの表示内容を更新しています。
EPSS は日次で悪用されやすさの相対度合いを推定します。パーセンタイルは採点済み CVE の中での相対位置(高いほど相対的に深刻)を示します。
| # | 日付 | 旧 EPSS スコア | 新 EPSS スコア | Δ(新 − 旧) |
|---|---|---|---|---|
| 1 | 2026-06-15 | 0.01% | 0.23% | +0.22% |
| 2 | 2026-03-24 | — | 0.01% | — |
EPSS の全履歴 (全 2 件)
この CVE の CVSS 指標。
| ベーススコア | バージョン | 深刻度 | ベクトル | 悪用しやすさ | 影響 | スコアの出典 |
|---|---|---|---|---|---|---|
| 4.5 | 4.0 | MEDIUM |
|
— | — | [email protected] |
| 7.5 | 3.1 | HIGH |
|
3.9 | 3.6 | [email protected] |
GHSA-f27w-vcwj-c954 · 深刻度: medium · エコシステム: rubygems — bcrypt-ruby has an Integer Overflow that Causes Zero Key-Strengthening Iterations at Cost=31 on JRuby
| vendor | priority | summary | link |
|---|---|---|---|
debian
|
not yet assigned | CVE-2026-33306 not yet assigned priority: Debian including 1 source packages (ruby-bcrypt), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): open 3, resolved 2. | https://security-tracker.debian.org/tracker/CVE-2026-33306 |
redhat
|
medium | — | https://access.redhat.com/security/cve/CVE-2026-33306 |
ubuntu
|
medium | CVE-2026-33306 medium priority: Ubuntu including 1 source packages (bcrypt), 6 status rows across 6 suites (bionic, jammy, noble, questing, upstream, xenial): DNE 3, needs-triage 3. | https://ubuntu.com/security/CVE-2026-33306 |
| ベンダー | 製品 | バージョン | 生の CPE |
|---|---|---|---|
| bcrypt-ruby_project | bcrypt-ruby | < 3.1.22 | cpe:2.3:a:bcrypt-ruby_project:bcrypt-ruby:*:*:*:*:*:ruby:*:* |
| URL | タグ |
|---|---|
| https://github.com/bcrypt-ruby/bcrypt-ruby/commit/831ce64cb0a9502130fa93a28bfd9527a5fa45c4 | Patch |
| https://github.com/bcrypt-ruby/bcrypt-ruby/releases/tag/v3.1.22 | Product Release Notes |
| https://github.com/bcrypt-ruby/bcrypt-ruby/security/advisories/GHSA-f27w-vcwj-c954 | Mitigation Vendor Advisory |