CVE-2026-32877

Botan: Heap Buffer Over-read in SM2 Decryption via Undersized C3 Hash Field

Published Mar 30, 2026 CVSS 3.1 · 8.2 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The vulnerability in the Botan cryptography library occurs during SM2 decryption. A check that verifies the size of the authentication code (C3) is omitted, so an attacker can supply a ciphertext that is too short and force the library to read beyond the intended buffer. This heap over‑read can reach 31 bytes and results in a crash or other undefined behavior, potentially producing a denial‑of‑service effect.

Affected Systems

All releases of Botan from version 2.3.0 up to, but not including, 3.11.0 are affected. The vulnerability appears in the SM2 decryption routine used by any application that links to the library.

Risk and Exploitability

The CVSS score of 8.2 signals high severity. The EPSS score is less than 1 % and the vulnerability is not listed in CISA’s KEV catalog. A successful exploitation requires an attacker to supply a malformed SM2 ciphertext to a component that uses Botan for decryption. The impact is limited to an application crash or other undefined behavior; no direct privilege escalation or data compromise is described in the advisory.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Botan to version 3.11.0 or later
  • Avoid processing untrusted SM2 ciphertext until the library is updated

Generated by OpenCVE AI on April 13, 2026 at 16:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Botan Project
Botan Project botan
CPEs cpe:2.3:a:botan_project:botan:*:*:*:*:*:*:*:*
Vendors & Products Botan Project
Botan Project botan
Type Values Removed Values Added
First Time appeared Randombit
Randombit botan
Vendors & Products Randombit
Randombit botan
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title Botan: Heap Buffer Over-read in SM2 Decryption via Undersized C3 Hash Field
Weaknesses CWE-125
References
Metrics cvssV3_1

{'score': 8.2, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H'}

Weaknesses
  • CWE-125

    Out-of-bounds Read

  • CWE-1284

    Improper Validation of Specified Quantity in Input

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Mar 31, 2026, 3:26 PM
Reserved
Mar 16, 2026, 9:03 PM
Status
Analyzed
Published
Mar 30, 2026, 9:17 PM
Modified
Jun 17, 2026, 10:36 AM
Severity
Moderate
Public date
Mar 30, 2026, 8:36 PM