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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.24 | wolfssl | 5.9.2-r0 | ALPINE-CVE-2026-12340 |
| Debian:12 | wolfssl | no fix listed | DEBIAN-CVE-2026-12340 |
| Debian:13 | wolfssl | no fix listed | DEBIAN-CVE-2026-12340 |
| Ubuntu:22.04:LTS | wolfssl | no fix listed | UBUNTU-CVE-2026-12340 |
| Ubuntu:24.04:LTS | wolfssl | no fix listed | UBUNTU-CVE-2026-12340 |
| Ubuntu:25.10 | wolfssl | no fix listed | UBUNTU-CVE-2026-12340 |
| Ubuntu:26.04:LTS | wolfssl | no fix listed | UBUNTU-CVE-2026-12340 |
| Ubuntu:26.10 | wolfssl | no fix listed | UBUNTU-CVE-2026-12340 |
Affected products (as reported)
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