Skip to main content

Botan EUVDEUVD-2026-113276

| CVE-2026-118767 MEDIUM
Improper Neutralization of Null Byte or NUL Character (CWE-158)
2026-10-29 GitHub_M
4.8
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit password containing embedded NUL
  2. Exploit
    Application policy validates full string
  3. Execution
    Botan Python bcrypt hashes only pre-NUL prefix
  4. Impact
    Effective 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

Botan 1.11.22, < 3.13.0

Affected Packages

euvd botan fix: 3.13.0

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

Vendor (GitHub_M) PRIMARY 4.8 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
vuln.today AI 3.7 LOW

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.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

1
Patch available
Oct 29, 2026 - 18:03 EUVD

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

EPSS Score
0.2%
Top 88% exploitable
Prevalence
Low
niche C++ crypto library; Python binding used by few applications
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

24
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +24
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

More in Botan

View all
CVE-2016-2195 CRITICAL
9.8 May 13

Integer overflow in the PointGFp constructor in Botan before 1.10.11 and 1.11.x before 1.11.27 allows remote attackers t

CVE-2016-2196 CRITICAL
9.8 May 13

Heap-based buffer overflow in the P-521 reduction function in Botan 1.11.x before 1.11.27 allows remote attackers to cau

CVE-2017-2801 MEDIUM POC
6.5 May 24

A programming error exists in a way Randombit Botan cryptographic library version 2.0.1 implements x500 string compariso

CVE-2024-50383 MEDIUM POC
5.9 Oct 23

Botan before 3.6.0, when certain GCC versions are used, has a compiler-induced secret-dependent operation in lib/utils/d

CVE-2024-50382 MEDIUM POC
5.9 Oct 23

Botan before 3.6.0, when certain LLVM versions are used, has compiler-induced secret-dependent control flow in lib/utils

CVE-2021-40529 MEDIUM POC
5.9 Sep 06

The ElGamal implementation in Botan through 2.18.1, as used in Thunderbird and other products, allows plaintext recovery

CVE-2018-12435 MEDIUM POC
5.9 Jun 15

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

CVE-2015-7826 CRITICAL
9.8 Apr 10

botan 1.11.x before 1.11.22 improperly handles wildcard matching against hostnames, which might allow remote attackers t

CVE-2016-6878 CRITICAL
9.8 Apr 10

The Curve25519 code in botan before 1.11.31, on systems without a native 128-bit integer type, might allow attackers to

CVE-2016-9132 CRITICAL
9.8 Jan 30

In Botan 1.8.0 through 1.11.33, when decoding BER data an integer overflow could occur, which would cause an incorrect l

CVE-2021-24115 CRITICAL
9.8 Feb 22

In Botan before 2.17.3, constant-time computations are not used for certain decoding and encoding operations (base32, ba

CVE-2018-9127 CRITICAL
9.8 Apr 02

Botan 2.2.0 - 2.4.0 (fixed in 2.5.0) improperly handled wildcard certificates and could accept certain certificates as v

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy