bcrypt: Non-ASCII hash input can cause verification panic
Affects bcryptSource GCVE Database
CVSS 5.3 Medium : upgrade to 0.19.2 when convenient.
Data as of 4 Dec 2026, 00:45 UTC
- Patch
- Available – fixed in 0.19.2
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LWhat to do
Upgrade bcrypt to 0.19.2.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| crates.iobcrypt | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A fix is available in bcrypt crate version 0.19.2, which rejects non-ASCII bytes in hash strings upfront. Users should upgrade to version 0.19.2 or later to remediate this denial-of-service vulnerability. No additional mitigation is required once upgraded. Downstream projects like pyca/bcrypt are not affected and do not require action.
Description
The bcrypt Rust crate versions 0.19.0 and 0.19.1 contain a vulnerability where verifying a bcrypt hash string with non-ASCII multi-byte UTF-8 characters at specific byte positions causes a panic. This leads to a denial-of-service condition in Rust applications using bcrypt::verify or HashParts::from_str with attacker-controlled hash inputs. The issue was introduced in version 0.19.0 and fixed in version 0.19.2 by rejecting non-ASCII bytes in hash strings upfront.
References
- github.com/Keats/rust-bcrypt/pull/103 (opens in a new tab)
- github.com/Keats/rust-bcrypt/commit/084bedde0aa5501c6d6a0287f6d6857e793fde85 (opens in a new tab)
- github.com/Keats/rust-bcrypt (opens in a new tab)
- github.com/Keats/rust-bcrypt/releases/tag/v0.19.2 (opens in a new tab)
- rustsec.org/advisories/RUSTSEC-2026-0199.html (opens in a new tab)