Skip to main content
← All vulnerabilities
CVE-2026-118767EUVD-2026-113276

Botan: Python binding bcrypt APIs truncate passwords containing embedded NULs

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 3.13.0
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

  1. CVE published
  2. First seen by cve.now

Affected versions

  • randombit botan

    From 1.11.22 · fixed in 3.13.0

References 3

GitHub · randombit/botan