`bcrypt::verify` · Panic
Affects bcryptSource GCVE Database
CVSS 5.3 Medium : upgrade to 0.19.2 when convenient.
Data as of 4 Dec 2026, 10:06 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.iobcryptpkg:cargo/bcryptOther threats | 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
Upgrade to bcrypt crate version 0.19.2 or later, which includes a fix that rejects non-ASCII hash strings upfront, eliminating the panic condition. No additional mitigation is required as the fix fully addresses the issue.
Description
A vulnerability in the Rust bcrypt crate versions 0.19.0 and 0.19.1 causes a panic when the verify function is called with a 60-byte string containing multi-byte UTF-8 characters at specific byte positions. This leads to a denial-of-service condition due to improper UTF-8 boundary checks in string slicing operations. The issue was fixed in version 0.19.2 by rejecting non-ASCII hash strings upfront.
References
- crates.io/crates/bcrypt (opens in a new tab)
- rustsec.org/advisories/RUSTSEC-2026-0199.html (opens in a new tab)
- github.com/Keats/rust-bcrypt/pull/103 (opens in a new tab)
- github.com/Keats/rust-bcrypt/issues/62 (opens in a new tab)
- github.com/Keats/rust-bcrypt/pull/95 (opens in a new tab)
- github.com/Keats/rust-bcrypt/commit/f5f1ee2862c1198a85afe3c2f8cd80835162b7e9 (opens in a new tab)