Vulnerability · Published Oct 29, 2026 · Assigned by GitHub_M
CVE-2026-118767Botan: Python binding bcrypt APIs truncate passwords containing embedded NULs
Medium 4.8
In plain English
A medium-severity security flaw in botan from randombit. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 12% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | botan | no fix listed | DEBIAN-CVE-2026-118767 |
| Debian:13 | botan | no fix listed | DEBIAN-CVE-2026-118767 |
| Debian:13 | botan3 | no fix listed | DEBIAN-CVE-2026-118767 |
| Debian:14 | botan3 | 3.13.0+dfsg-2 | DEBIAN-CVE-2026-118767 |
Affected products (as reported)
Weakness: CWE-158 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
References
- https://github.com/randombit/botan/security/advisories/GHSA-w8gj-5xrm-gvrp x_refsource_CONFIRM
- https://github.com/randombit/botan/pull/5814 x_refsource_MISC
- https://github.com/randombit/botan/commit/5a4ac737e72e18a08eca848049e3dd38571c73b4 x_refsource_MISC