CVE-2026-33306
Last modified
CVE-2026-33306 is a high-severity vulnerability rated 7.5/10 on the CVSS scale. 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. EPSS estimates a 0.23% chance of exploitation in the next 30 days.
Description
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.
Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Bcrypt-Ruby Project | Bcrypt-Ruby | < 3.1.22 |
References
Timeline
- Published
- Last Modified
- Status
- Analyzed
Frequently Asked Questions
What is CVE-2026-33306?
How severe is CVE-2026-33306?
How do I fix CVE-2026-33306?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-33300Discourse is an open-source discussion platform. From versio…6.5
- CVE-2026-33301OpenEMR is a free and open source electronic health records …8.1
- CVE-2026-33302OpenEMR is a free and open source electronic health records …8.1
- CVE-2026-33303OpenEMR is a free and open source electronic health records …5.4
- CVE-2026-33304OpenEMR is a free and open source electronic health records …6.5
- CVE-2026-33305OpenEMR is a free and open source electronic health records …5.4
- CVE-2026-33307Mod_gnutls is a TLS module for Apache HTTPD based on GnuTLS.…7.5
- CVE-2026-33308Mod_gnutls is a TLS module for Apache HTTPD based on GnuTLS.…5.9
- CVE-2026-33309Langflow is a tool for building and deploying AI-powered age…9.9
- CVE-2026-3331The Lobot Slider Administrator plugin for WordPress is vulne…4.3
- CVE-2026-33310Intake is a package for finding, investigating, loading and …8.8
- CVE-2026-33311DiceBear is an avatar library for designers and developers. …4.7
Are you affected by CVE-2026-33306?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
