{"id":"CVE-2026-4395","state":"PUBLISHED","title":"Heap-based buffer overflow in wc_ecc_import_x963_ex KCAPI path","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.","publishedAt":"2026-03-19T20:41:55.642Z","updatedAt":"2026-03-20T17:09:33.816Z","severity":{"score":1.3,"label":"Low","version":"4.0","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","source":"wolfSSL"},"assigner":"wolfSSL","products":["wolfSSL wolfssl"],"affected":[{"vendor":"wolfSSL","product":"wolfssl","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThanOrEqual":"5.8.4","versionType":"semver"}],"platforms":["Linux"],"repo":"https://github.com/wolfSSL/wolfssl","modules":["wolfcrypt ECC"],"programFiles":["wolfcrypt/src/ecc.c"],"programRoutines":[{"name":"wc_ecc_import_x963_ex"}]}],"references":["https://github.com/wolfSSL/wolfssl/pull/9988"],"weaknesses":["CWE-122"],"ingestedAt":"2026-10-29T20:12:16.098Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/4xxx/CVE-2026-4395.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-4395","state":"PUBLISHED","datePublished":"2026-03-19T20:41:55.642Z","dateUpdated":"2026-03-20T17:09:33.816Z","assignerShortName":"wolfSSL","assignerOrgId":"50d2cd11-d01a-48ed-9441-5bfce9d63b27","dateReserved":"2026-03-18T15:49:41.133Z"},"containers":{"cna":{"title":"Heap-based buffer overflow in wc_ecc_import_x963_ex KCAPI path","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"wolfSSL","product":"wolfssl","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThanOrEqual":"5.8.4","versionType":"semver"}],"platforms":["Linux"],"repo":"https://github.com/wolfSSL/wolfssl","modules":["wolfcrypt ECC"],"programFiles":["wolfcrypt/src/ecc.c"],"programRoutines":[{"name":"wc_ecc_import_x963_ex"}]}],"references":[{"url":"https://github.com/wolfSSL/wolfssl/pull/9988","tags":["patch"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"NONE","userInteraction":"PASSIVE","vulnConfidentialityImpact":"LOW","subConfidentialityImpact":"NONE","vulnIntegrityImpact":"LOW","subIntegrityImpact":"NONE","vulnAvailabilityImpact":"LOW","subAvailabilityImpact":"NONE","exploitMaturity":"PROOF_OF_CONCEPT","Safety":"NOT_DEFINED","Automatable":"YES","Recovery":"USER","valueDensity":"DIFFUSE","vulnerabilityResponseEffort":"LOW","providerUrgency":"AMBER","version":"4.0","baseSeverity":"LOW","baseScore":1.3,"vectorString":"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"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-122","lang":"en","description":"CWE-122 Heap-based Buffer Overflow","type":"CWE"}]}],"providerMetadata":{"shortName":"wolfSSL","orgId":"50d2cd11-d01a-48ed-9441-5bfce9d63b27","dateUpdated":"2026-03-19T20:41:55.642Z"},"impacts":[{"capecId":"CAPEC-100","descriptions":[{"lang":"en","value":"CAPEC-100 Overflow Buffers"}]}],"workarounds":[{"lang":"en","value":"Build wolfSSL without WOLFSSL_KCAPI_ECC (this define is not enabled by default).","supportingMedia":[{"type":"text/html","base64":false,"value":"Build wolfSSL without WOLFSSL_KCAPI_ECC (this define is not enabled by default)."}]}],"solutions":[{"lang":"en","value":"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.","supportingMedia":[{"type":"text/html","base64":false,"value":"&nbsp;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."}]}],"credits":[{"lang":"en","value":"Haruto Kimura (Stella)","type":"finder"}],"source":{"discovery":"EXTERNAL"},"x_generator":{"engine":"Vulnogram 1.0.1"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-03-20T17:09:25.537926Z","id":"CVE-2026-4395","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-03-20T17:09:33.816Z"}}]}}}