Platform
cpp
Component
botan
Fixed in
2.3.1
CVE-2026-32877 describes a heap over-read vulnerability in the Botan cryptography library. Specifically, during SM2 decryption, the code failed to properly validate the length of the authentication code, potentially leading to a heap over-read and a crash or undefined behavior. This vulnerability affects Botan versions 2.3.0 up to, but not including, version 3.11.0. The issue has been addressed and patched in Botan version 3.11.0.
CVE-2026-32877 affects the Botan cryptography library in versions from 2.3.0 up to, but not including, 3.11.0. During SM2 decryption, the code responsible for checking the authentication code value (C3) fails to validate the expected length of the encoded value before performing the comparison. A malicious ciphertext can trigger a heap over-read of up to 31 bytes, potentially leading to a crash or other undefined behavior. This vulnerability could allow an attacker to gain sensitive information or execute arbitrary code.
Exploitation of this vulnerability requires an attacker to control the SM2 ciphertext being processed. A specially crafted ciphertext can be designed to trigger the heap over-read during the decryption process. The difficulty of exploitation depends on the attacker's ability to influence the ciphertext and the sensitivity of the data being protected. While no public exploits have been reported, the severity of the vulnerability warrants immediate attention and remediation.
Exploit Status
EPSS
0.05% (17% percentile)
CISA SSVC
CVSS Vector
The recommended mitigation for this vulnerability is to upgrade Botan to version 3.11.0 or later. This version includes a fix that correctly validates the encoded value's length before comparison, preventing the heap over-read. Users are strongly advised to apply this update as soon as possible to reduce the risk of exploitation. Additionally, review application dependencies to ensure all libraries are updated and protected against known vulnerabilities. Consider implementing input validation and other defensive coding practices.
Actualice la biblioteca Botan a la versión 3.11.0 o superior. Esto corregirá la vulnerabilidad de lectura fuera de límites en el proceso de descifrado SM2. La actualización asegura que la longitud del valor del código de autenticación (C3) se verifique correctamente antes de la comparación, evitando así la posible sobrelectura del heap.
Vulnerability analysis and critical alerts directly to your inbox.
Versions of Botan from 2.3.0 up to, but not including, 3.11.0 are affected by this vulnerability.
You can check your Botan version by consulting your project's documentation or using dependency management tools.
If you cannot update immediately, consider implementing additional mitigation measures, such as input validation and limiting the library's exposure.
Some static and dynamic security analysis tools may be able to detect this vulnerability. Consult your security tool documentation for more information.
SM2 is a public-key cryptography algorithm developed in China, used for digital signatures and encryption.
Upload your dependency file and we'll tell you instantly if this and other CVEs hit you.