{"id":"CVE-2026-118767","summary":"Botan: Python binding bcrypt APIs truncate passwords containing embedded NULs","details":"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.","aliases":["GHSA-w8gj-5xrm-gvrp"],"modified":"2026-11-01T02:30:29.100248450Z","published":"2026-10-29T17:17:24.323Z","database_specific":{"cwe_ids":["CWE-158"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/118xxx/CVE-2026-118767.json","cna_assigner":"GitHub_M"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/118xxx/CVE-2026-118767.json"},{"type":"ADVISORY","url":"https://github.com/randombit/botan/security/advisories/GHSA-w8gj-5xrm-gvrp"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-118767"},{"type":"FIX","url":"https://github.com/randombit/botan/commit/5a4ac737e72e18a08eca848049e3dd38571c73b4"},{"type":"FIX","url":"https://github.com/randombit/botan/pull/5814"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/randombit/botan","events":[{"introduced":"3d253c524e3e4f21a11c857ab0827fe34c2ee307"},{"fixed":"2a81eef56c96c237e590c27f9a75e60317c9c700"},{"fixed":"5a4ac737e72e18a08eca848049e3dd38571c73b4"}],"database_specific":{"extracted_events":[{"strategy":"StringRangeExpression","range":[{"introduced":"1.11.22"},{"fixed":"3.13.0"}],"source":"AFFECTED_FIELD"},{"range":[{"fixed":"5a4ac737e72e18a08eca848049e3dd38571c73b4"}],"source":"REFERENCES_COMMIT"}]}}],"versions":["3.12.0","3.11.1","3.11.0","3.10.0","3.9.0","3.8.1","3.8.0","3.7.1","3.7.0","3.6.1","3.6.0","3.5.0","3.4.0","3.3.0","3.2.0","3.1.1","3.1.0","3.0.0","3.0.0-rc1","3.0.0-alpha1","3.0.0-alpha0","2.17.0","2.16.0","2.15.0","2.14.0","2.13.0","2.12.1","2.12.0","2.11.0","2.10.0","2.9.0","2.8.0","2.7.0","2.6.0","2.5.0","2.4.0","2.3.0","2.2.0","2.1.0","2.0.1","2.0.0","1.11.34","1.11.33","1.11.32","1.11.31","1.11.30","1.11.29","1.11.28","1.11.27","1.11.26","1.11.25","1.11.24","1.11.23","1.11.22"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-118767.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N"}]}