{"id":"CVE-2026-118767","kind":"vulnerability","aliases":["CVE-2026-118767"],"related":[],"title":"Botan Python binding: bcrypt truncates passwords at embedded NUL bytes","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.","summary":"Botan's Python binding passes strings containing a NUL character to bcrypt and check_bcrypt, which hash only the part before the NUL. An application that validates a long password but hashes the truncated value can have its password policy bypassed.","severity":"medium","cvss":4.8,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["botan","package","password-hashing","python"],"not_affected_if":["non-python-binding","nul-characters-rejected","scrypt-or-argon2-only"],"how_to_check":"- Check the installed Botan version with `python -c \"import botan3; print(botan3.version_string())\"` or the package manager, and compare against the fixed release.\n- Search the codebase for calls to `bcrypt` or `check_bcrypt` from the Botan Python binding that receive user-supplied passwords.","fix":"- Botan `3.13.0` (fixed version per the description; affected range from `1.11.22` until `3.13.0`)","status":"open","published_at":"2026-10-29T18:17:28+00:00","first_seen_at":"2026-10-29T18:26:33+00:00","triaged_at":"2026-10-29T18:28:46+00:00","updated_at":"2026-10-29T18:28:46+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-29T18:28:46Z","model":"claude-haiku-5-5","output":{"fix":"- Botan `3.13.0` (fixed version per the description; affected range from `1.11.22` until `3.13.0`)","reach":"internet","title":"Botan Python binding: bcrypt truncates passwords at embedded NUL bytes","impact":"medium","summary":"Botan's Python binding passes strings containing a NUL character to bcrypt and check_bcrypt, which hash only the part before the NUL. An application that validates a long password but hashes the truncated value can have its password policy bypassed.","audience":"developers","category":"package","nicknames":[],"who_cares":["python","botan","password-hashing"],"confidence":0.7,"fix_status":"available","needs_auth":"no","worst_case":"Password policy is bypassed, so weaker passwords get accepted and stored.","analyst_note":"","how_to_check":"- Check the installed Botan version with `python -c \"import botan3; print(botan3.version_string())\"` or the package manager, and compare against the fixed release.\n- Search the codebase for calls to `bcrypt` or `check_bcrypt` from the Botan Python binding that receive user-supplied passwords.","plain_action":"","needs_analyst":false,"not_affected_if":["scrypt-or-argon2-only","non-python-binding","nul-characters-rejected"],"who_is_affected":"Applications that use Botan's Python binding for bcrypt password hashing and accept user passwords that may contain NUL characters. Scrypt and argon2 are not affected, so systems that use only those are not exposed. Applications that reject control characters in passwords before hashing are unlikely to be exposed.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"medium"},"cost_usd":0.00071,"input_tokens":4165,"output_tokens":586,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'+0000':83C '-118767':13A,16A '-2026':12A,15A '1.11.22':71C '3.13.0':73C,136C 'allow':119C 'applic':47B,107C,120C 'argon2':127C 'bcrypt':4A,34B,37B,95C,98C 'bind':3A,26B,77C 'botan':1A,17B,23B,64C,74C 'bypass':63B,124C 'byte':10A 'c':67C 'caus':94C 'char':86C 'charact':32B 'check':36B,97C 'consist':89C 'const':85C 'contain':29B,81C 'convert':78C 'could':108C 'cryptographi':68C 'cve':11A,14A 'effect':117C 'embed':8A,92C 'fix':133C 'hash':21B,39B,54B,114C 'issu':131C 'librari':69C 'long':51B 'longer':111C 'nul':9A,31B,45B,93C,106C 'packag':18B 'part':42B 'pass':27B 'password':6A,20B,52B,61B,112C,122C 'password-hash':19B 'password-polici':121C 'polici':62B,123C 'prefix':103C 'process':100C 'python':2A,22B,25B,76C,79C 'reject':90C 'scrypt':125C 'shorter':116C 'string':28B,80C 'truncat':5A,56B 'u':82C 'unaffect':129C 'valid':49B,109C 'valu':57B,87C,118C 'version':135C 'without':88C","nicknames":[],"mitigations":[],"who_affected":"Applications that use Botan's Python binding for bcrypt password hashing and accept user passwords that may contain NUL characters. Scrypt and argon2 are not affected, so systems that use only those are not exposed. Applications that reject control characters in passwords before hashing are unlikely to be exposed.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"first_public_at":"2026-10-29T18:17:28+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-118767","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-118767","severity":null,"published_at":"2026-10-29T18:17:28+00:00","modified_at":"2026-10-29T18:17:28+00:00","first_seen_at":"2026-10-29T18:26:33+00:00","fetched_at":"2026-10-29T18:26:33+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}