CVE-2026-3229
wolfSSL vulnerability analysis and mitigation

Overview

CVE-2026-3229 is an integer overflow vulnerability in the wolfSSL cryptographic library affecting the static function wolfssl_add_to_chain, which causes heap corruption when certificate data is written out of bounds of an insufficiently sized certificate buffer. It affects all wolfSSL versions prior to 5.9.0. The vulnerability was published on March 19, 2026, and patched via a pull request merged on February 25, 2026. It carries a CVSS v3.1 base score of 5.5 (Medium) and a CVSS v4.0 base score of 1.2 (Low) (Feedly, GitHub PR).

Technical details

The root cause is a 32-bit integer overflow (CWE-122: Heap-based Buffer Overflow) in the expression len + CERT_HEADER_SZ + certSz within wolfssl_add_to_chain in src/ssl_load.c, where all operands are word32 (unsigned 32-bit) types. When the sum wraps around, the resulting value is smaller than expected, causing a heap buffer to be allocated with insufficient size; subsequent certificate data writes then occur out of bounds. The vulnerable code path is reachable only through the APIs wolfSSL_CTX_add_extra_chain_cert, wolfSSL_CTX_add1_chain_cert, and wolfSSL_add0_chain_cert, which are enabled by build-time compatibility flags: enable-opensslall, enable-opensslextra, enable-lighty, enable-stunnel, enable-nginx, and enable-haproxy. Exploitation is strictly local and requires that the application context responsible for loading certificates is already compromised (GitHub PR, Feedly).

Impact

Successful exploitation results in heap corruption, which can cause application crashes or unpredictable behavior, leading to a denial-of-service condition. Because the vulnerability affects only availability (no confidentiality or integrity impact under CVSS v3.1), the primary risk is service disruption for applications using wolfSSL with the affected OpenSSL-compatibility build flags. The vulnerability is not remotely exploitable and requires local access with a compromised certificate-loading context, significantly limiting its practical impact (Feedly).

Exploitation steps

  1. Precondition: Attacker must have local access to a system running a wolfSSL-linked application built with one of the affected compatibility flags (enable-opensslall, enable-opensslextra, enable-lighty, enable-stunnel, enable-nginx, or enable-haproxy) and must be able to influence the certificate data loaded by the application context.
  2. Craft oversized certificate chain: Prepare a certificate chain where the cumulative length of existing chain data (len) plus CERT_HEADER_SZ plus the new certificate size (certSz) causes a word32 integer overflow, resulting in a wrapped-around (very small) value.
  3. Trigger vulnerable API: Supply the crafted certificate data to one of the affected APIs (wolfSSL_CTX_add_extra_chain_cert, wolfSSL_CTX_add1_chain_cert, or wolfSSL_add0_chain_cert) through the compromised application context.
  4. Heap corruption: The overflowed size causes an undersized heap buffer to be allocated; subsequent writes of certificate data exceed the buffer bounds, corrupting adjacent heap memory.
  5. Denial of service: The heap corruption leads to an application crash or undefined behavior, achieving a denial-of-service condition (GitHub PR, Feedly).

Indicators of compromise

  • Logs: Unexpected application crashes or segmentation faults in processes linked against wolfSSL (e.g., nginx, lighttpd, stunnel, haproxy) around certificate loading operations.
  • Process: Abnormal termination of TLS-enabled services with heap corruption error messages or core dumps referencing wolfssl_add_to_chain or ssl_load.c.
  • File System: Presence of core dump files generated by wolfSSL-linked processes, potentially containing heap corruption artifacts.

Mitigation and workarounds

Upgrade wolfSSL to version 5.9.0 or later, which includes the fix that adds an overflow guard for the len + CERT_HEADER_SZ + certSz calculation in wolfssl_add_to_chain. The patch was merged on February 25, 2026 (GitHub PR). As a workaround for systems that cannot be immediately upgraded, restrict local access to systems running vulnerable wolfSSL-linked applications and avoid enabling the affected compatibility build flags (enable-opensslall, enable-opensslextra, enable-lighty, enable-stunnel, enable-nginx, enable-haproxy) if not required. FreeBSD users can track the fix via the wolfssl port update (FreeBSD Ports).

Community reactions

A Medium blog post by researcher @FufuFaf1 described discovering the integer overflow incidentally while building a certificate chain, providing informal community context around the bug's discoverability (Medium). Tenable published a Nessus detection plugin (ID 303241) for the vulnerability (Tenable). Overall community reaction has been muted given the low severity and non-remote exploitability of the issue.

Additional resources


SourceThis report was generated using AI

Related wolfSSL vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-6330MEDIUM6.3
  • wolfSSL logowolfSSL
  • wolfssl
NoYesJun 25, 2026
CVE-2026-8720MEDIUM5.9
  • wolfSSL logowolfSSL
  • wolfssl
NoYesJun 25, 2026
CVE-2026-7511MEDIUM5.9
  • wolfSSL logowolfSSL
  • cpe:2.3:a:wolfssl:wolfssl
NoYesJun 25, 2026
CVE-2026-7532MEDIUM5.7
  • wolfSSL logowolfSSL
  • wolfssl
NoYesJun 25, 2026
CVE-2026-6331LOW2.1
  • wolfSSL logowolfSSL
  • cpe:2.3:a:wolfssl:wolfssl
NoYesJun 25, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management