Skip to main content

Botan CVE-2026-32877

| EUVDEUVD-2026-17210 HIGH
Out-of-bounds Read (CWE-125)
2026-03-30 GitHub_M
8.2
CVSS 3.1 · GitHub Advisory
View

Attack ChainAIDerived

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

  1. Access
    Craft malformed SM2 ciphertext with invalid C3 length
  2. Exploit
    Send to vulnerable Botan SM2 decryption function
  3. Execution
    Trigger heap over-read beyond buffer bounds
  4. Impact
    Cause crash or memory disclosure

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK

1 technique across 1 tactic: Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Botan versions 2.3.0 through 3.10.x with SM2 cryptography enabled. Remote unauthenticated attacker sends crafted SM2-encrypted ciphertext. Application must attempt SM2 decryption on attacker-controlled input. No user interaction required.

Impact

Real-world risk is moderate-to-high for systems processing untrusted SM2 ciphertexts, though practical exploitation complexity tempers immediate urgency. The CVSS 8.2 score reflects legitimate concerns: network-accessible attack vector (AV:N), low complexity (AC:L), no authentication required (PR:N), and high availability impact (A:H) from denial-of-service potential. However, the confidentiality impact is rated only Low (C:L), as the 31-byte over-read may expose limited heap data but does not guarantee extraction of sensitive cryptographic material. Without EPSS data, we assess exploitation likelihood as moderate - the vulnerability requires attackers to craft malformed SM2 ciphertexts and target systems actively using Botan's SM2 implementation, which has more limited deployment than mainstream algorithms like RSA or AES. No CISA KEV listing and no public exploit identified at time of analysis suggest this is not yet widely targeted. Primary risk scenarios include: (1) denial-of-service against SM2-enabled services through repeated malformed ciphertext submissions causing crashes; (2) potential information disclosure if heap layout is predictable and adjacent memory contains secrets; (3) undefined behavior exploitation in memory-unsafe contexts. Organizations using Botan for SM2 operations, particularly in Chinese regulatory environments requiring SM2 compliance, should prioritize patching. Systems not using SM2 functionality remain unaffected despite running vulnerable Botan versions.

Exploit ScenarioDerived

An attacker identifies a cloud-based document encryption service using Botan 3.10.x with SM2 for Chinese market compliance. The attacker crafts a malicious SM2 ciphertext with a truncated C3 authentication tag and submits it through the service's decryption API. When Botan attempts to validate the authentication code, the missing length check triggers a heap over-read, causing the service process to crash and denying legitimate users access to decryption functionality. By repeatedly submitting crafted payloads during peak hours, the attacker sustains a denial-of-service condition. In a more sophisticated scenario, the attacker analyzes crash dumps or timing variations to infer adjacent heap memory contents, potentially leaking cryptographic key material or session tokens if memory layout is predictable.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Mar 30, 2026

Heap over-read in Botan C++ cryptography library versions 2.3.0 through 3.10.x allows remote, unauthenticated attackers to trigger crashes or undefined behavior during SM2 decryption. The vulnerability stems from insufficient length validation of authentication code (C3) values in SM2 ciphertexts, enabling reads of up to 31 bytes beyond allocated heap memory. With CVSS 8.2 (AV:N/AC:L/PR:N/UI:N) and EPSS data not provided, this represents a remotely exploitable memory safety issue in a cryptographic primitive. No public exploit identified at time of analysis. Patched in version 3.11.0.

RemediationAI

Vendor-released patch: Botan version 3.11.0 completely resolves the vulnerability through proper length validation of SM2 authentication codes prior to memory operations. Organizations should upgrade all Botan installations to version 3.11.0 or later immediately, prioritizing systems that process SM2 ciphertexts from untrusted sources. For environments unable to upgrade immediately, interim mitigations include restricting SM2 decryption operations to trusted ciphertext sources only, implementing strict input validation before passing data to Botan's SM2 functions, and deploying monitoring for abnormal process terminations that may indicate exploitation attempts. Organizations not using SM2 functionality may deprioritize updates but should plan upgrades during normal maintenance cycles to address this and potential future vulnerabilities. Review the GitHub Security Advisory at https://github.com/randombit/botan/security/advisories/GHSA-7jj6-4r42-w9h6 for additional vendor guidance and update instructions specific to your deployment model.

Affected VersionsENISA

Botan 2.3.0, < 3.11.0

Affected Packages

euvd botan_2_3_0 fix: 3.11.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

Botan is a widely-used open-source cryptography library for C++ applications, supporting modern algorithms including SM2, a Chinese national standard elliptic curve cryptography algorithm (ISO/IEC 14888-3). The vulnerability (CWE-125: Out-of-bounds Read) occurs in the SM2 decryption implementation's validation logic for the C3 authentication tag component of SM2 ciphertexts. The affected code failed to verify that the encoded C3 value length matched expectations before performing memory comparison operations. This missing boundary check allows specially crafted SM2 ciphertexts to trigger heap buffer over-reads of up to 31 bytes, potentially exposing adjacent heap memory contents or causing process crashes. The flaw exists in the cryptographic layer itself, not in TLS/protocol handling, meaning any application using Botan's SM2 decryption functionality with untrusted ciphertext inputs is potentially affected. The affected version range (2.3.0 to 3.10.x) spans approximately 7 years of releases, indicating broad deployment across systems using SM2 encryption.

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

GitHub Advisory PRIMARY 8.2 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
Red Hat 6.5 MEDIUM

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

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

Lifecycle Timeline

3
Analysis Updated
Apr 16, 2026 - 06:10 EUVD-patch-fix
executive summary
Patch available
Apr 16, 2026 - 05:29 EUVD
3.11.0
CVE Published
Mar 30, 2026 - 20:36 nvd
HIGH 8.2

DescriptionGitHub Advisory

Botan is a C++ cryptography library. From version 2.3.0 to before version 3.11.0, during SM2 decryption, the code that checked the authentication code value (C3) failed to check that the encoded value was of the expected length prior to comparison. An invalid ciphertext can cause a heap over-read of up to 31 bytes, resulting in a crash or potentially other undefined behavior. This issue has been patched in version 3.11.0.

Executive ViewAI

Why It Matters

Botan C++ cryptography library versions 2.3.0 through 3.10.x contain a heap over-read vulnerability in SM2 decryption that allows unauthenticated remote attackers to crash applications or trigger undefined behavior. Organizations using Botan for cryptographic operations face service disruption and potential information disclosure risks; this requires immediate inventory and patching of affected deployments.

Business Impact: High
Compensating Controls

Vendor-released patch: Botan 3.11.0 or later. If immediate patching is not feasible: (1) Disable SM2 cipher support at the application level if not business-critical; (2) restrict network access to Botan-dependent services using network segmentation and firewall rules; (3) implement application-level input validation to reject malformed SM2 ciphertexts before Botan processing; (4) monitor for unexpected process crashes or memory errors in production logs.

Threat Intelligence Overview

EPSS Score
0.0%
Top 86% exploitable
Data Quality
5 sources
Confidence: Medium
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

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 HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

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

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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

Vendor StatusVendor

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