Safeguard
Vulnerability Analysis•

CVE-2026-4395: Critical Heap Overflow in wolfSSL KCAPI ECC

CVE-2026-4395: a heap overflow in wolfSSL wc_ecc_import_x963_ex when built with KCAPI ECC, reachable during TLS key exchange. Check the wolfSSL fix.

Safeguard Security Team
3 min read

CVE-2026-4395 is a heap buffer overflow (CVSS 9.8, critical) in wolfSSL, in the KCAPI ECC code path of wc_ecc_import_x963_ex. A malicious peer can send an oversized EC point during TLS key exchange. It affects builds with WOLFSSL_KCAPI_ECC only, and the fix is in the project pull request.

What's affected

The record does not list affected or fixed release numbers. It describes the vulnerable code path: the WOLFSSL_KCAPI_ECC build option copies the input into a 132 byte field, pubkey_raw, with no length check. The ATECC code path has such a check.

The record points to wolfSSL pull request 9988 as the fix. I did not retrieve it, so check the wolfSSL release notes for the version that includes it.

How to check if you're exposed

You are only exposed if your build enables the KCAPI ECC option.

  1. Read your wolfSSL version from the header file wolfssl/version.h, in the LIBWOLFSSL_VERSION_STRING line.
  2. Check your build options, such as the generated options.h or your configure flags, for WOLFSSL_KCAPI_ECC.
  3. If that option is not set, this CVE does not apply to your build. If it is, compare your version with the release that includes pull request 9988.
  4. Remember embedded firmware and vendor products that bundle wolfSSL. Ask the vendor.

What to do now

  1. Find every product and image that bundles wolfSSL and check whether it enables KCAPI ECC.
  2. Update to the wolfSSL release that includes the fix from pull request 9988, once you have confirmed it in the release notes.
  3. If you cannot update, build without the KCAPI ECC option where your platform allows.
  4. Ask vendors that embed wolfSSL for fixed firmware.
  5. Record the wolfSSL version and options in your SBOM.

Why it matters

The weakness is CWE-122, heap based buffer overflow. The code copied an externally supplied value into a fixed size buffer without checking its size. A peer in a TLS handshake controls that value, so a malicious server can write past the end of the buffer.

The score is 9.8 because it needs no login and no user action, but the real world exposure is limited to the specific build option. That is a good reason to check configurations rather than just version numbers. The KEV flag is false.

Try it yourself

Click through it at your own pace, or open it full screen.

Quick check

Am I affected if I use wolfSSL without KCAPI?

The record describes the flaw in the KCAPI ECC code path only. Builds without that option do not use it.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.