Heap-based buffer overflow in the KCAPI ECC code path of wc_ecc_import_x963_ex() in wolfSSL wolfcrypt allows a remote attacker to write attacker-controlled data past the bounds of the pubkey_raw buffer via a crafted oversized EC public key point. The WOLFSSL_KCAPI_ECC code path copies the input to key->pubkey_raw (132 bytes) using XMEMCPY without a bounds check, unlike the ATECC code path which includes a length validation. This can be triggered during TLS key exchange when a malicious peer sends a crafted ECPoint in ServerKeyExchange.
Advisories

No advisories yet.

Fixes

Solution

Update to the wolfSSL version containing the fix from PR #9988, which adds a bounds check on inLen before the XMEMCPY to pubkey_raw in the KCAPI ECC code path.


Workaround

Build wolfSSL without WOLFSSL_KCAPI_ECC (this define is not enabled by default).

History

Thu, 19 Mar 2026 21:00:00 +0000

Type Values Removed Values Added
Description Heap-based buffer overflow in the KCAPI ECC code path of wc_ecc_import_x963_ex() in wolfSSL wolfcrypt allows a remote attacker to write attacker-controlled data past the bounds of the pubkey_raw buffer via a crafted oversized EC public key point. The WOLFSSL_KCAPI_ECC code path copies the input to key->pubkey_raw (132 bytes) using XMEMCPY without a bounds check, unlike the ATECC code path which includes a length validation. This can be triggered during TLS key exchange when a malicious peer sends a crafted ECPoint in ServerKeyExchange.
Title Heap-based buffer overflow in wc_ecc_import_x963_ex KCAPI path
Weaknesses CWE-122
References
Metrics cvssV4_0

{'score': 1.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/AU:Y/R:U/V:D/RE:L/U:Amber'}


Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: wolfSSL

Published:

Updated: 2026-03-19T20:41:55.642Z

Reserved: 2026-03-18T15:49:41.133Z

Link: CVE-2026-4395

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-03-19T21:17:13.660

Modified: 2026-03-19T21:17:13.660

Link: CVE-2026-4395

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.

Weaknesses