Botan: Python binding bcrypt APIs truncate passwords containing embedded NULs
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 3.13.0
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
Botan, a C++ cryptography library, is affected through its Python binding, specifically the bcrypt functions used for password hashing. Passwords containing an embedded null character can be silently shortened before hashing, which could let an attacker bypass an application's password policy.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
Botan is a C++ cryptography library. From 1.11.22 until 3.13.0, Botan's Python binding converted Python strings containing U+0000 to const char* values without consistently rejecting the embedded NUL, causing bcrypt and check_bcrypt to process only the prefix before the NUL. Applications could validate a longer password but hash a shorter effective value, allowing application password-policy bypass; scrypt and argon2 are unaffected. This issue is fixed in version 3.13.0.
Timeline
- CVE published
- First seen by cve.now
Affected versions
- randombit botan
From 1.11.22 · fixed in 3.13.0