Vulnerability · Published Jun 25, 2026 · Assigned by wolfSSL

CVE-2026-12340Out-of-bounds heap read in SM2/SM3 certificate Subject Key Identifier computation

Medium 6.3

In plain English

A medium-severity out-of-bounds read in wolfSSL from wolfSSL. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 23% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)6.3Medium
Exploit odds (30 days)0.3%top 77.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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).

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.24wolfssl5.9.2-r0ALPINE-CVE-2026-12340
Debian:12wolfsslno fix listedDEBIAN-CVE-2026-12340
Debian:13wolfsslno fix listedDEBIAN-CVE-2026-12340
Ubuntu:22.04:LTSwolfsslno fix listedUBUNTU-CVE-2026-12340
Ubuntu:24.04:LTSwolfsslno fix listedUBUNTU-CVE-2026-12340
Ubuntu:25.10wolfsslno fix listedUBUNTU-CVE-2026-12340
Ubuntu:26.04:LTSwolfsslno fix listedUBUNTU-CVE-2026-12340
Ubuntu:26.10wolfsslno fix listedUBUNTU-CVE-2026-12340

Affected products (as reported)

VendorProductVersions
wolfSSL wolfSSL 5.6.4 – through 5.9.1

Weakness: CWE-125 · Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

References