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.

Severity (CVSS 3.1)4.8Medium
Exploit odds (30 days)0.2%top 87.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Debian:12botanno fix listedDEBIAN-CVE-2026-118767
Debian:13botanno fix listedDEBIAN-CVE-2026-118767
Debian:13botan3no fix listedDEBIAN-CVE-2026-118767
Debian:14botan33.13.0+dfsg-2DEBIAN-CVE-2026-118767

Affected products (as reported)

VendorProductVersions
randombit botan >= 1.11.22, < 3.13.0

Weakness: CWE-158 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N

References