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).
Published: 2026-06-25
Score: 6.3 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

During verification of an SM2/SM3 certificate, Key Identifier reads the trailing 65 bytes of the public key without verifying that the key is actually that long. If the public key embedded in the certificate is shorter than 65 bytes, the logic performs an out-of-bounds read on the heap which can lead to a program crash. The vulnerability does not allow any out-of-bounds write, and there is no compromise of confidentiality or integrity; the primary impact is a denial of service through a crash of the wolfSSL-enabled application.

Affected Systems

This weakness affects all builds of the wolfSSL library that have SM2 support enabled, either by selecting --enable-sm2 or --enable-all during compilation. The issue is present in every vendor implementation of wolfSSL that includes SM2/SM3 functionality and handles certificate verification.

Risk and Exploitability

The CVSS score of 6.3 classifies the vulnerability as medium severity. There is no EPSS data available, and the issue is not currently listed in the CISA KEV catalog, which suggests it is not known to be actively exploited in the wild. However, the attack could be performed by an adversary who can supply an arbitrary certificate to a wolfSSL-enabled service that verifies certificates. Because the vulnerability causes a crash but not a writable buffer overflow, the likelihood of a successful exploitation is lower than for more severe buffer-overflow bugs, but a determined attacker could still leverage the crash to perform denial-of-service attacks against the affected service.

Generated by OpenCVE AI on June 25, 2026 at 21:23 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the latest wolfSSL release that includes the SM2/SM3 Subject Key Identifier bug fix
  • If a patch cannot be applied immediately, disable SM2 support during compilation or at runtime to prevent the vulnerable code from executing
  • Conduct a security review to ensure no legacy certificates with small public keys are accepted by services that remain vulnerable

Generated by OpenCVE AI on June 25, 2026 at 21:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 26 Jun 2026 01:15:00 +0000

Type Values Removed Values Added
First Time appeared Wolfssl
Wolfssl wolfssl
Vendors & Products Wolfssl
Wolfssl wolfssl

Thu, 25 Jun 2026 20:00:00 +0000

Type Values Removed Values Added
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).
Title Out-of-bounds heap read in SM2/SM3 certificate Subject Key Identifier computation
Weaknesses CWE-125
References
Metrics cvssV4_0

{'score': 6.3, '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: wolfSSL

Published:

Updated: 2026-06-25T19:36:21.468Z

Reserved: 2026-06-15T16:30:26.001Z

Link: CVE-2026-12340

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-26T01:00:05Z

Weaknesses