High severity · published Jun 25, 2026
CVE-2026-12340
Out-of-bounds heap read in SM2/SM3 certificate Subject Key Identifier computation
7.5
CVSS
0.3%
EPSS
No
On KEV
Description
Out-of-bounds heap read during SM2/SM3 certificate signature verification. When parsing a certificate with an SM3wSM2 signature, the Subject Key Identifier computation reads the trailing 65 bytes of the public key without checking that the key is at least that long. A public key shorter than 65 bytes results in an out-of-bounds heap read, leading to a potential crash (denial of service); there is no out-of-bounds write. Note this only affects builds with SM2 support (--enable-sm2 or --enable-all).
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
None
Integrity
None
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.3% · higher than 22% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
WO
wolfSSL · wolfSSL
5.6.4 through 5.9.1 · source: vendor, NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-12340
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-12340
Issue Tracking
https://github.com/wolfSSL/wolfssl/pull/10641
Vendor Advisory
https://www.wolfssl.com/docs/security-vulnerabilities/
More from wolfSSL
9.8
CVE-2026-7531
Use-after-free in PQC hybrid key-share handling
9.8
CVE-2026-5264
DTLS 1.3 ACK heap buffer overflow
9.8
CVE-2026-5187
Heap Out-of-Bounds Write in DecodeObjectId() in wolfSSL
9.8
CVE-2026-4395
Heap-based buffer overflow in wc_ecc_import_x963_ex KCAPI path
9.8
CVE-2026-3849
Buffer Overflow in HPKE via Oversized ECH Config
