# CVE-2026-118767: Botan: Python binding bcrypt APIs truncate passwords containing embedded NULs

- Severity: Medium 4.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 20% of CVEs (2026-12-01)
- Published: 2026-10-29T17:17:24.323Z
- Modified: 2026-10-30T19:37:07.073Z
- Weaknesses: CWE-158
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- randombit botan: >= 1.11.22, < 3.13.0

## References

- <https://github.com/randombit/botan/security/advisories/GHSA-w8gj-5xrm-gvrp>
- <https://github.com/randombit/botan/pull/5814>
- <https://github.com/randombit/botan/commit/5a4ac737e72e18a08eca848049e3dd38571c73b4>

## Sources

- CVE List: [CVE-2026-118767](https://www.cve.org/CVERecord?id=CVE-2026-118767), CVE Terms of Use, modified 2026-10-30
- NVD: [CVE-2026-118767](https://nvd.nist.gov/vuln/detail/CVE-2026-118767), Public domain, modified 2026-10-30

---

Page: https://cve.day/CVE-2026-118767 · Whole record: https://cve.day/CVE-2026-118767.json · Rebuilt by cve.day 2026-11-25T22:59:47.816Z
