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

- Severity: Medium 6.3 (CVSS:4.0, scored by wolfSSL) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.39%, higher than 34% of CVEs (2026-12-01)
- Published: 2026-06-25T19:36:21.468Z
- Modified: 2026-06-26T18:54:32.567Z
- Weaknesses: CWE-125
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: wolfSSL

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

(As written by CVE List.)

## Affected

- wolfSSL wolfSSL: from 5.6.4 up to 5.9.1; from 5.6.4 before 5.9.2

## Every score

- wolfSSL: CVSS:4.0 6.3 Medium `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`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/wolfSSL/wolfssl/pull/10641> (issue-tracking, patch)
- <https://www.wolfssl.com/docs/security-vulnerabilities/> (vendor-advisory)

## Sources

- CVE List: [CVE-2026-12340](https://www.cve.org/CVERecord?id=CVE-2026-12340), CVE Terms of Use, modified 2026-06-26
- NVD: [CVE-2026-12340](https://nvd.nist.gov/vuln/detail/CVE-2026-12340), Public domain, modified 2026-06-26

---

Page: https://cve.day/CVE-2026-12340 · Whole record: https://cve.day/CVE-2026-12340.json · Rebuilt by cve.day 2026-11-25T22:59:26.429Z
