Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit password containing embedded NUL
-
ExploitApplication policy validates full string
-
ExecutionBotan Python bcrypt hashes only pre-NUL prefix
-
ImpactEffective weak password bypasses policy
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Metacharacter neutralization
|
| Exploitation Conditions | Requires an application that (1) uses Botan's Python binding (botan3.py) at a version >= 1.11.22 and < 3.13.0, (2) calls bcrypt() or check_bcrypt() specifically - scrypt and argon2 are unaffected, (3) passes application-controlled password strings to that binding without itself rejecting embedded NUL (U+0000) characters, and (4) enforces a password policy that validates the full string before hashing. The flaw is the Python binding's inconsistent conversion of a Python str to const char*, truncating at the embedded NUL. Limiting factors: it is confined to the Python binding (not the direct C++ API path), only bcrypt/check_bcrypt are affected, and it is inert in any application that already rejects NUL bytes in user input; no authentication is needed to supply such input (PR:N) but realistic impact depends on the calling application's policy design. |
| Impact | This is a low-to-moderate severity, specialized correctness flaw rather than a broad security emergency. The input CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N, base 4.8) reflects high attack complexity and limited impact, consistent with the Decision label of 'this_month' (not act_now or emergency). No EPSS score is provided and the CVE is not in CISA KEV, so there is no evidence of active or widespread exploitation; status is 'no public exploit identified at time of analysis' (the only public references are the vendor advisory, fix PR, and commit, i.e. remediation artifacts, not exploit code). The signals are internally consistent: a non-KEV, this_month library binding bug with narrow preconditions. The C:L in the supplied vector is debatable - the described impact is a password-policy bypass (weakened/effective-shorter password), which is better characterized as an integrity concern than confidentiality; this is noted rather than treated as confirmed. Real-world priority is low unless an organization specifically runs an application that uses Botan's Python binding for bcrypt-based password handling. |
| Exploit ScenarioDerived | An application uses Botan's Python binding and enforces a password-complexity policy, calling bcrypt() to hash user-chosen passwords. A user submits a value containing an embedded NUL such as "x\0-Acceptable-Password-42!": the application's policy check sees a long, complex string and accepts it, but Botan hashes only the prefix "x", storing a trivially weak credential that defeats the policy. No public exploit code exists; the advisory supplies only an illustrative example string. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 29, 2026
Password policy bypass in Botan's Python binding lets an application hash a shorter password than the one its policy validated: strings such as "x\0-Acceptable-Password-42!" are truncated at the embedded U+0000 when passed to bcrypt() or check_bcrypt(), so the full string passes policy review while only the prefix "x" is actually hashed. Applications using the Botan Python binding (botan3.py) from 1.11.22 until 3.13.0 are affected if they accept application-controlled password strings without rejecting NUL characters and enforce a password policy on the full string; scrypt and argon2 are unaffected, and the trigger is confined to the Python binding rather than the C++ API path. The issue is remotely reachable without credentials (AV:N/PR:N), but exploitation depends entirely on the calling application's policy design and input validation, and no public exploit was identified at time of analysis. A public upstream fix exists in Botan 3.13.0.
RemediationAI
Vendor-released patch: 3.13.0 - upgrade the Botan Python binding to version 3.13.0 or later, as documented in GHSA-w8gj-5xrm-gvrp and implemented in pull request 5814 (commit 5a4ac737e72e18a08eca848049e3dd38571c73b4), which makes the string-conversion helper raise ValueError on any embedded NUL. Where upgrading is not immediately possible, the vendor's stated workaround is to reject embedded NUL characters in every application-controlled string before passing it to Botan's Python binding, which prevents the application from validating a different value than the library consumes; the trade-off is that this validation must be implemented consistently at every call site that reaches bcrypt or check_bcrypt, and any code path that misses it remains exposed. Applications that must keep the pre-3.13 binding should also audit whether password policy checks and hashing operate on the same effective string. After upgrading, callers should expect ValueError to be raised for inputs containing U+0000 - including the shared string arguments on X509Cert.hostname_match and X509Cert.verify - so error handling and user-facing messages need to accommodate the new exception rather than treating it as an unexpected failure.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CWE-158 (Improper Neutralization of Null Byte or NUL Character) in a language-boundary conversion layer. Botan's Python binding (src/python/botan3.py) converts Python str objects to C-style const char* strings through a helper (_ctype_str) before handing them to C APIs that expect NUL-terminated buffers. That helper did not consistently reject an embedded U+0000, so a Python string of arbitrary length reached C code that stopped reading at the first NUL - the binding consumed a prefix of the caller's value while Python-level logic had inspected the whole string. The affected entry points are bcrypt() and check_bcrypt(); the advisory explicitly states scrypt and argon2 were unaffected. The upstream fix, in pull request 5814, adds an explicit check in _ctype_str that raises ValueError('Botan C string arguments cannot contain embedded NUL bytes') when a NUL is present in the input string; the same conversion helper underlies other string-argument APIs, and the accompanying test additions show X509Cert.hostname_match, X509Cert.verify(hostname=...) and X509Cert.verify(trusted_path=...) now also reject embedded NUL strings such as "example.com\0.attacker.invalid". The vulnerability class is a validation/consumption mismatch rather than memory corruption: no out-of-bounds access is described in the supplied sources, only truncation of an application-supplied value at the embedded NUL.
Know when Botan gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Network-submitted password input (AV:N, PR:N); AC:H because impact depends on the calling app enforcing a policy and not rejecting NULs; policy bypass is an integrity effect (I:L), no confidentiality or availability impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Integer overflow in the PointGFp constructor in Botan before 1.10.11 and 1.11.x before 1.11.27 allows remote attackers t
Heap-based buffer overflow in the P-521 reduction function in Botan 1.11.x before 1.11.27 allows remote attackers to cau
A programming error exists in a way Randombit Botan cryptographic library version 2.0.1 implements x500 string compariso
Botan before 3.6.0, when certain GCC versions are used, has a compiler-induced secret-dependent operation in lib/utils/d
Botan before 3.6.0, when certain LLVM versions are used, has compiler-induced secret-dependent control flow in lib/utils
The ElGamal implementation in Botan through 2.18.1, as used in Thunderbird and other products, allows plaintext recovery
Botan 2.5.0 through 2.6.0 before 2.7.0 allows a memory-cache side-channel attack on ECDSA signatures, aka the Return Of
botan 1.11.x before 1.11.22 improperly handles wildcard matching against hostnames, which might allow remote attackers t
The Curve25519 code in botan before 1.11.31, on systems without a native 128-bit integer type, might allow attackers to
In Botan 1.8.0 through 1.11.33, when decoding BER data an integer overflow could occur, which would cause an incorrect l
In Botan before 2.17.3, constant-time computations are not used for certain decoding and encoding operations (base32, ba
Botan 2.2.0 - 2.4.0 (fixed in 2.5.0) improperly handled wildcard certificates and could accept certain certificates as v
EUVD-2026-113276
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB