Impact
When a Python string contains an embedded NUL (U+0000), the Botan Python binding converts it to a const char* without consistently rejecting the NUL. As a result, the bcrypt and check_bcrypt functions truncate the password at the first NUL, hashing only the preceding prefix. Applications that validate a longer password against policy checks may therefore store and compare a shorter hashed value, enabling a user to satisfy the policy with a weak password that is effectively hidden in the stored hash. This flaw is a data conversion misuse, identified as CWE‑158. Cryptographic algorithms scrypt and argon2 are unaffected.
Affected Systems
Randombit Botan is affected. Any installation of Botan from version 1.11.22 up through 3.13.0 (inclusive) includes a Python binding that improperly handles NUL bytes in passwords. The issue is fixed in version 3.13.0.
Risk and Exploitability
The CVSS score is 4.8, indicating moderate severity. No EPSS score is available and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector is local or application‑level, requiring the attacker to supply a crafted password to the binding. If the application relies on bcrypt for authentication, the truncation can allow a password that meets policy requirements to be hashed incorrectly, effectively bypassing the password policy. Because the flaw does not directly lead to code execution or system compromise, the overall risk is limited to authentication and policy enforcement, but the impact on the integrity of password validation is significant.
OpenCVE Enrichment