← Vulnerabilities

MediumAdvisoryRust

bcrypt: Non-ASCII hash input can cause verification panic

Affected

PackageAffected versionsFixed in
rust:bcrypt>= 0.19.0, < 0.19.20.19.2

bcrypt::verify(password, hash) and HashParts::from_str(hash) panic in str::slice_error_fail when given a 60-byte &str containing a multi-byte UTF-8 character at certain byte positions. Impact Any Rust code that calls bcrypt::verify (or HashParts::from_str) with an attacker-controlled hash string will panic. The bcrypt crate is #![forbid(unsafe_code)], so this is limited to a denial-of-service and cannot lead to memory corruption. Realistic attack contexts include: - Rust authentication services…

Read on GitHub Advisory Database

On 12/04/2026, 08:53 AM, GitHub Advisory Database published "bcrypt: Non-ASCII hash input can cause verification panic" (type: Advisory). Severity is "Medium" (medium). Related technologies: Rust.