CVE-2026-3229
Received Received - Intake
Integer Overflow in wolfSSL Certificate Chain Causes Heap Corruption

Publication date: 2026-03-19

Last updated on: 2026-03-26

Assigner: wolfSSL Inc.

Description
An integer overflow vulnerability existed in the static function wolfssl_add_to_chain, that caused heap corruption when certificate data was written out of bounds of an insufficiently sized certificate buffer. wolfssl_add_to_chain is called by these API: wolfSSL_CTX_add_extra_chain_cert, wolfSSL_CTX_add1_chain_cert, wolfSSL_add0_chain_cert. These API are enabled for 3rd party compatibility features: enable-opensslall, enable-opensslextra, enable-lighty, enable-stunnel, enable-nginx, enable-haproxy. This issue is not remotely exploitable, and would require that the application context loading certificates is compromised.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-03-19
Last Modified
2026-03-26
Generated
2026-05-27
AI Q&A
2026-03-19
EPSS Evaluated
2026-05-25
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
wolfssl wolfssl to 5.9.0 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-122 A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

[{'type': 'paragraph', 'content': "This vulnerability is a 32-bit integer overflow in the wolfSSL library's function wolfssl_add_to_chain. It occurs when calculating the size of a new certificate chain using the sum of certain values, which can overflow and cause incorrect memory allocation."}, {'type': 'paragraph', 'content': 'Because of this overflow, heap corruption can happen when certificate data is written beyond the bounds of an insufficiently sized buffer.'}, {'type': 'paragraph', 'content': 'The affected function is called by several APIs related to adding certificate chains, which are enabled for third-party compatibility features.'}, {'type': 'paragraph', 'content': 'The issue is not remotely exploitable and requires that the application context loading certificates is already compromised.'}, {'type': 'paragraph', 'content': 'A fix was implemented by adding explicit bounds checking to prevent the overflow and ensure safe memory allocation.'}] [1]


How can this vulnerability impact me? :

If exploited, this vulnerability can cause heap corruption due to writing certificate data out of bounds.

Heap corruption can lead to application instability, crashes, or potentially allow an attacker with local access to escalate privileges or execute arbitrary code.

However, this vulnerability is not remotely exploitable and requires that the application context loading certificates is already compromised, limiting the risk to local or pre-compromised environments.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

I don't know


How can this vulnerability be detected on my network or system? Can you suggest some commands?

Detection of this vulnerability involves verifying whether the wolfSSL library in use contains the integer overflow issue in the function wolfssl_add_to_chain. Since the vulnerability is triggered by certificate chain length calculations leading to heap corruption, one practical approach is to run the regression test introduced in the wolfSSL API test suite that simulates certificate chain lengths approaching UINT32_MAX to check if the overflow condition is properly handled.

There are no specific network or system commands provided to detect exploitation attempts because the issue is not remotely exploitable and requires compromised application context loading certificates.

To detect if your wolfSSL version is vulnerable, you can check the version or patch level of the wolfSSL library installed. If you have access to the source or build environment, running the wolfSSL API test suite (tests/api.c) that includes the regression test for this overflow can help confirm if the fix is applied.


What immediate steps should I take to mitigate this vulnerability?

The immediate mitigation step is to update the wolfSSL library to the version that includes the fix merged on February 25, 2026, which adds explicit bounds checking to prevent the integer overflow in wolfssl_add_to_chain.

Since the vulnerability is not remotely exploitable and requires compromised application context loading certificates, ensuring that your application environment is secure and that certificate loading processes are not exposed to untrusted inputs is also important.

Applying the patch or upgrading to a wolfSSL version containing the fix will prevent heap corruption caused by this integer overflow.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart