OESA-2026-1723 (CVE-2026-33306)
Vulnerability from osv_openeuler – Published: 2026-03-27 11:10 – Updated: 2026-08-06 11:10 – Source websitebcrypt() is a sophisticated and secure hash algorithm designed by The OpenBSD project for hashing passwords. bcrypt-ruby provides a simple, humane wrapper for safely handling passwords.
Security Fix(es):
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)
| URL | Type | |
|---|---|---|
{
"affected": [
{
"ecosystem_specific": {
"aarch64": [
"rubygem-bcrypt-3.1.18-2.oe2403sp3.aarch64.rpm",
"rubygem-bcrypt-debuginfo-3.1.18-2.oe2403sp3.aarch64.rpm",
"rubygem-bcrypt-debugsource-3.1.18-2.oe2403sp3.aarch64.rpm"
],
"noarch": [
"rubygem-bcrypt-help-3.1.18-2.oe2403sp3.noarch.rpm"
],
"src": [
"rubygem-bcrypt-3.1.18-2.oe2403sp3.src.rpm"
],
"x86_64": [
"rubygem-bcrypt-3.1.18-2.oe2403sp3.x86_64.rpm",
"rubygem-bcrypt-debuginfo-3.1.18-2.oe2403sp3.x86_64.rpm",
"rubygem-bcrypt-debugsource-3.1.18-2.oe2403sp3.x86_64.rpm"
]
},
"package": {
"ecosystem": "openEuler:24.03-LTS-SP3",
"name": "rubygem-bcrypt",
"purl": "pkg:rpm/openEuler/rubygem-bcrypt\u0026distro=openEuler-24.03-LTS-SP3"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.1.18-2.oe2403sp3"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"ecosystem_specific": {
"aarch64": [
"rubygem-bcrypt-3.1.12-2.oe2003sp4.aarch64.rpm",
"rubygem-bcrypt-debuginfo-3.1.12-2.oe2003sp4.aarch64.rpm",
"rubygem-bcrypt-debugsource-3.1.12-2.oe2003sp4.aarch64.rpm"
],
"noarch": [
"rubygem-bcrypt-help-3.1.12-2.oe2003sp4.noarch.rpm"
],
"src": [
"rubygem-bcrypt-3.1.12-2.oe2003sp4.src.rpm"
],
"x86_64": [
"rubygem-bcrypt-3.1.12-2.oe2003sp4.x86_64.rpm",
"rubygem-bcrypt-debuginfo-3.1.12-2.oe2003sp4.x86_64.rpm",
"rubygem-bcrypt-debugsource-3.1.12-2.oe2003sp4.x86_64.rpm"
]
},
"package": {
"ecosystem": "openEuler:20.03-LTS-SP4",
"name": "rubygem-bcrypt",
"purl": "pkg:rpm/openEuler/rubygem-bcrypt\u0026distro=openEuler-20.03-LTS-SP4"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.1.12-2.oe2003sp4"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"ecosystem_specific": {
"aarch64": [
"rubygem-bcrypt-3.1.12-2.oe2203sp4.aarch64.rpm",
"rubygem-bcrypt-debuginfo-3.1.12-2.oe2203sp4.aarch64.rpm",
"rubygem-bcrypt-debugsource-3.1.12-2.oe2203sp4.aarch64.rpm"
],
"noarch": [
"rubygem-bcrypt-help-3.1.12-2.oe2203sp4.noarch.rpm"
],
"src": [
"rubygem-bcrypt-3.1.12-2.oe2203sp4.src.rpm"
],
"x86_64": [
"rubygem-bcrypt-3.1.12-2.oe2203sp4.x86_64.rpm",
"rubygem-bcrypt-debuginfo-3.1.12-2.oe2203sp4.x86_64.rpm",
"rubygem-bcrypt-debugsource-3.1.12-2.oe2203sp4.x86_64.rpm"
]
},
"package": {
"ecosystem": "openEuler:22.03-LTS-SP4",
"name": "rubygem-bcrypt",
"purl": "pkg:rpm/openEuler/rubygem-bcrypt\u0026distro=openEuler-22.03-LTS-SP4"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.1.12-2.oe2203sp4"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"ecosystem_specific": {
"aarch64": [
"rubygem-bcrypt-3.1.18-2.oe2403sp3.aarch64.rpm",
"rubygem-bcrypt-debuginfo-3.1.18-2.oe2403sp3.aarch64.rpm",
"rubygem-bcrypt-debugsource-3.1.18-2.oe2403sp3.aarch64.rpm",
"rubygem-bcrypt-3.1.18-2.oe2403.aarch64.rpm",
"rubygem-bcrypt-debuginfo-3.1.18-2.oe2403.aarch64.rpm",
"rubygem-bcrypt-debugsource-3.1.18-2.oe2403.aarch64.rpm",
"rubygem-bcrypt-3.1.18-2.oe2403sp1.aarch64.rpm",
"rubygem-bcrypt-debuginfo-3.1.18-2.oe2403sp1.aarch64.rpm",
"rubygem-bcrypt-debugsource-3.1.18-2.oe2403sp1.aarch64.rpm",
"rubygem-bcrypt-3.1.18-2.oe2403sp2.aarch64.rpm",
"rubygem-bcrypt-debuginfo-3.1.18-2.oe2403sp2.aarch64.rpm",
"rubygem-bcrypt-debugsource-3.1.18-2.oe2403sp2.aarch64.rpm"
],
"noarch": [
"rubygem-bcrypt-help-3.1.18-2.oe2403sp3.noarch.rpm",
"rubygem-bcrypt-help-3.1.18-2.oe2403.noarch.rpm",
"rubygem-bcrypt-help-3.1.18-2.oe2403sp1.noarch.rpm",
"rubygem-bcrypt-help-3.1.18-2.oe2403sp2.noarch.rpm"
],
"src": [
"rubygem-bcrypt-3.1.18-2.oe2403sp3.src.rpm",
"rubygem-bcrypt-3.1.18-2.oe2403.src.rpm",
"rubygem-bcrypt-3.1.18-2.oe2403sp1.src.rpm",
"rubygem-bcrypt-3.1.18-2.oe2403sp2.src.rpm"
],
"x86_64": [
"rubygem-bcrypt-3.1.18-2.oe2403sp3.x86_64.rpm",
"rubygem-bcrypt-debuginfo-3.1.18-2.oe2403sp3.x86_64.rpm",
"rubygem-bcrypt-debugsource-3.1.18-2.oe2403sp3.x86_64.rpm",
"rubygem-bcrypt-3.1.18-2.oe2403.x86_64.rpm",
"rubygem-bcrypt-debuginfo-3.1.18-2.oe2403.x86_64.rpm",
"rubygem-bcrypt-debugsource-3.1.18-2.oe2403.x86_64.rpm",
"rubygem-bcrypt-3.1.18-2.oe2403sp1.x86_64.rpm",
"rubygem-bcrypt-debuginfo-3.1.18-2.oe2403sp1.x86_64.rpm",
"rubygem-bcrypt-debugsource-3.1.18-2.oe2403sp1.x86_64.rpm",
"rubygem-bcrypt-3.1.18-2.oe2403sp2.x86_64.rpm",
"rubygem-bcrypt-debuginfo-3.1.18-2.oe2403sp2.x86_64.rpm",
"rubygem-bcrypt-debugsource-3.1.18-2.oe2403sp2.x86_64.rpm"
]
},
"package": {
"ecosystem": "openEuler:24.03-LTS",
"name": "rubygem-bcrypt",
"purl": "pkg:rpm/openEuler/rubygem-bcrypt\u0026distro=openEuler-24.03-LTS"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.1.18-2.oe2403sp2"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"ecosystem_specific": {
"aarch64": [
"rubygem-bcrypt-3.1.18-2.oe2403sp1.aarch64.rpm",
"rubygem-bcrypt-debuginfo-3.1.18-2.oe2403sp1.aarch64.rpm",
"rubygem-bcrypt-debugsource-3.1.18-2.oe2403sp1.aarch64.rpm"
],
"noarch": [
"rubygem-bcrypt-help-3.1.18-2.oe2403sp1.noarch.rpm"
],
"src": [
"rubygem-bcrypt-3.1.18-2.oe2403sp1.src.rpm"
],
"x86_64": [
"rubygem-bcrypt-3.1.18-2.oe2403sp1.x86_64.rpm",
"rubygem-bcrypt-debuginfo-3.1.18-2.oe2403sp1.x86_64.rpm",
"rubygem-bcrypt-debugsource-3.1.18-2.oe2403sp1.x86_64.rpm"
]
},
"package": {
"ecosystem": "openEuler:24.03-LTS-SP1",
"name": "rubygem-bcrypt",
"purl": "pkg:rpm/openEuler/rubygem-bcrypt\u0026distro=openEuler-24.03-LTS-SP1"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.1.18-2.oe2403sp1"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"ecosystem_specific": {
"aarch64": [
"rubygem-bcrypt-3.1.18-2.oe2403sp2.aarch64.rpm",
"rubygem-bcrypt-debuginfo-3.1.18-2.oe2403sp2.aarch64.rpm",
"rubygem-bcrypt-debugsource-3.1.18-2.oe2403sp2.aarch64.rpm"
],
"noarch": [
"rubygem-bcrypt-help-3.1.18-2.oe2403sp2.noarch.rpm"
],
"src": [
"rubygem-bcrypt-3.1.18-2.oe2403sp2.src.rpm"
],
"x86_64": [
"rubygem-bcrypt-3.1.18-2.oe2403sp2.x86_64.rpm",
"rubygem-bcrypt-debuginfo-3.1.18-2.oe2403sp2.x86_64.rpm",
"rubygem-bcrypt-debugsource-3.1.18-2.oe2403sp2.x86_64.rpm"
]
},
"package": {
"ecosystem": "openEuler:24.03-LTS-SP2",
"name": "rubygem-bcrypt",
"purl": "pkg:rpm/openEuler/rubygem-bcrypt\u0026distro=openEuler-24.03-LTS-SP2"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.1.18-2.oe2403sp2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"severity": "Medium"
},
"details": "bcrypt() is a sophisticated and secure hash algorithm designed by The OpenBSD project for hashing passwords. bcrypt-ruby provides a simple, humane wrapper for safely handling passwords.\r\n\r\nSecurity Fix(es):\n\nbcrypt-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 \u2014 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)",
"id": "OESA-2026-1723",
"modified": "2026-08-06T11:10:45Z",
"published": "2026-03-27T11:10:45Z",
"references": [
{
"type": "ADVISORY",
"url": "https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2026-1723"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-33306"
}
],
"schema_version": "1.7.2",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "rubygem-bcrypt security update",
"upstream": [
"CVE-2026-33306"
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.