Skip to main content

wolfSSL CVE-2026-12340

| EUVDEUVD-2026-39547 MEDIUM
Out-of-bounds Read (CWE-125)
2026-06-25 wolfSSL GHSA-q349-x427-xg3w
6.3
CVSS 4.0 · Vendor: wolfSSL
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malformed SM3wSM2 certificate with sub-65-byte public key
  2. Delivery
    Submit certificate to wolfSSL parsing endpoint
  3. Exploit
    ParseCertRelative invokes SKID computation
  4. Execution
    Unconditional 65-byte heap read past key buffer
  5. Persist
    Out-of-bounds heap read triggers crash
  6. Impact
    Application denial of service

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK

1 technique across 1 tactic: Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

wolfSSL must be compiled with SM2 support enabled (--enable-sm2 or --enable-all build flags - non-default). The application must parse X.509 certificates received from untrusted sources, such as TLS client certificate validation or certificate chain processing. The malicious certificate must carry an SM3wSM2 signature algorithm (OID 1.2.156.10197.1.501) and a SubjectPublicKeyInfo body shorter than 65 bytes. Limiting factors: wolfSSL builds without SM2 support are entirely unaffected; exploitation requires the ability to present a certificate to a parsing endpoint (network reachable but not universally exposed); CVSS PR:N confirms no authentication is needed to submit the certificate. Successful exploitation produces a process crash; information leakage from the heap over-read is plausible but not confirmed.

Impact

The vendor-supplied CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N, score 6.3) accurately captures the key risk drivers. AT:P (attack requirements present) is the critical limiter: SM2 support is a non-default compile-time option, drastically shrinking the vulnerable population. Availability impact is rated Low (VA:L) - a heap read crash rather than a persistent or escalating impact. No confidentiality impact is reflected (VC:N), though the 'Information Disclosure' tag indicates adjacent heap content may be exposed during the over-read; the description explicitly states there is no out-of-bounds write, bounding the worst case to crash plus potential memory leak. This is not in CISA KEV and no EPSS data was provided; active exploitation is considered unlikely. Real-world priority is moderate: patch when building with SM2 support, but this does not warrant emergency response for non-SM2 deployments.

Exploit ScenarioDerived

An attacker sends a crafted X.509 certificate - bearing an SM3wSM2 signature algorithm identifier and a SubjectPublicKeyInfo containing fewer than 65 bytes of public key material - to a wolfSSL-based application that validates untrusted certificates (e.g., a TLS server performing client certificate authentication). During SKID derivation in ParseCertRelative, wolfSSL reads 65 bytes past the end of the undersized key buffer on the heap, triggering a crash and potentially exposing adjacent heap memory. No public exploit code exists at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 25, 2026

Out-of-bounds heap read in wolfSSL's SM2/SM3 certificate parser exposes applications to remote denial of service when processing malformed certificates. During Subject Key Identifier computation in SM3wSM2 certificate verification, the library unconditionally reads 65 bytes from the public key field without first validating that the key is at least that long - a crafted certificate with a sub-65-byte public key triggers a heap over-read, crashing the process. This vulnerability is scoped exclusively to wolfSSL builds compiled with SM2 support (--enable-sm2 or --enable-all), and no public exploit or CISA KEV listing exists at time of analysis.

RemediationAI

The upstream fix is available via GitHub PR #10641 (https://github.com/wolfSSL/wolfssl/pull/10641), which adds a pubKeySize bounds check before the 65-byte SKID heap read in wolfcrypt/src/asn.c. A specific tagged release containing this fix has not been independently confirmed from available data - monitor the wolfSSL security page at https://www.wolfssl.com/docs/security-vulnerabilities/ for a patched release version. As an immediate workaround with no cryptographic functionality loss (for deployments not requiring Chinese national cryptographic standards), recompile wolfSSL without --enable-sm2 and without --enable-all to exclude the SM2/SM3 code paths entirely; this eliminates the vulnerable code at build time with no side effects for non-SM2 use cases.

Affected VersionsENISA

wolfSSL 5.6.4 ≤5.9.1

Affected Packages

euvd wolfssl no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

wolfSSL is a lightweight embedded SSL/TLS library (CPE: cpe:2.3:a:wolfssl:wolfssl:*:*:*:*:*:*:*:*) widely used in resource-constrained and IoT environments as an OpenSSL alternative. The flaw (CWE-125: Out-of-bounds Read) resides in ParseCertRelative within wolfcrypt/src/asn.c. When computing the Subject Key Identifier (SKID) for a certificate bearing an SM3wSM2 signature algorithm (OID 1.2.156.10197.1.501), the code reads the trailing 65 bytes of the SubjectPublicKeyInfo public key body unconditionally, assuming a full uncompressed SM2 point (0x04 || 32-byte X || 32-byte Y = 65 bytes). No length check precedes this read. The fix confirmed in PR #10641 inserts if (cert->pubKeySize < 65) { return BUFFER_E; } before the read. The vulnerable path is gated at compile time by WOLFSSL_SM2 and WOLFSSL_SM3 defines, meaning only intentionally SM2-enabled builds are reachable.

Know when Wolfssl gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (wolfSSL) PRIMARY 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
vuln.today AI 3.7 LOW

Network-reachable but requires non-default SM2 compile flag (AC:H); impact limited to availability crash; no confidentiality or integrity impact confirmed.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (wolfSSL).

CVSS VectorVendor: wolfSSL

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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

Threat Intelligence Overview

EPSS Score
0.2%
Top 89% exploitable
Prevalence
Medium
popular embedded TLS library, common in IoT and constrained devices
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2017-13099 HIGH POC
7.5 Dec 13

wolfSSL prior to version 3.12.2 provides a weak Bleichenbacher oracle when any TLS cipher suite using RSA key exchange i

CVE-2017-2800 CRITICAL POC
9.8 May 24

A specially crafted x509 certificate can cause a single out of bounds byte overwrite in wolfSSL through 3.10.2 resulting

CVE-2026-89136 HIGH POC
8.3 Sep 27

Authentication bypass in wolfSSL TLS clients built with Raw Public Key (RPK) support allows a malicious or on-path serve

CVE-2026-93302 HIGH POC
8.3 Sep 27

wolfSSL builds that enable the WOLFSSL_TRUST_PEER_CERT macro can be induced to accept a forged clone of a trusted-peer C

CVE-2026-89102 HIGH POC
8.3 Sep 27

Certificate forgery in the wolfSSL client (versions 5.7.2 through 5.9.2) lets a remote attacker who already holds any ce

CVE-2015-6925 HIGH POC
7.5 Jan 22

wolfSSL (formerly CyaSSL) before 3.6.8 allows remote attackers to cause a denial of service (resource consumption or tra

CVE-2022-39173 HIGH POC
7.5 Sep 29

In wolfSSL before 5.5.1, malicious clients can cause a buffer overflow during a TLS 1.3 handshake. Rated high severity (

CVE-2022-38152 HIGH POC
7.5 Aug 31

An issue was discovered in wolfSSL before 5.5.0. Rated high severity (CVSS 7.5), this vulnerability is remotely exploita

CVE-2020-11713 HIGH POC
7.5 Apr 12

wolfSSL 4.3.0 has mulmod code in wc_ecc_mulmod_ex in ecc.c that does not properly resist timing side-channel attacks. Ra

CVE-2019-18840 HIGH POC
7.5 Nov 09

In wolfSSL 4.1.0 through 4.2.0c, there are missing sanity checks of memory accesses in parsing ASN.1 certificate data wh

CVE-2020-15309 HIGH POC
7.0 Aug 21

An issue was discovered in wolfSSL before 4.5.0, when single precision is not employed. Rated high severity (CVSS 7.0).

CVE-2020-24613 MEDIUM POC
6.8 Aug 24

wolfSSL before 4.5.0 mishandles TLS 1.3 server data in the WAIT_CERT_CR state, within SanityCheckTls13MsgReceived() in t

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy