CVE-2026-0819
Received Received - Intake
Stack Buffer Overflow in wolfSSL PKCS7 SignedData Encoding

Publication date: 2026-03-19

Last updated on: 2026-04-29

Assigner: wolfSSL Inc.

Description
A stack buffer overflow vulnerability exists in wolfSSL's PKCS7 SignedData encoding functionality. In wc_PKCS7_BuildSignedAttributes(), when adding custom signed attributes, the code passes an incorrect capacity value (esd->signedAttribsCount) to EncodeAttributes() instead of the remaining available space in the fixed-size signedAttribs[7] array. When an application sets pkcs7->signedAttribsSz to a value greater than MAX_SIGNED_ATTRIBS_SZ (default 7) minus the number of default attributes already added, EncodeAttributes() writes beyond the array bounds, causing stack memory corruption. In WOLFSSL_SMALL_STACK builds, this becomes heap corruption. Exploitation requires an application that allows untrusted input to control the signedAttribs array size when calling wc_PKCS7_EncodeSignedData() or related signing functions.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-03-19
Last Modified
2026-04-29
Generated
2026-05-07
AI Q&A
2026-03-19
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
wolfssl wolfssl From 5.5.0 (inc) to 5.9.0 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-787 The product writes data past the end, or before the beginning, of the intended buffer.
CWE-121 A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function).
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a stack buffer overflow in wolfSSL's PKCS7 SignedData encoding functionality. Specifically, when adding custom signed attributes, the code incorrectly uses the total count of signed attributes instead of the remaining available space in a fixed-size array. This causes the EncodeAttributes() function to write beyond the bounds of the signedAttribs array, leading to stack memory corruption or heap corruption in certain builds. Exploitation requires an application to allow untrusted input to control the size of the signedAttribs array during signing operations.


How can this vulnerability impact me? :

The vulnerability can lead to memory corruption, either on the stack or heap, depending on the build configuration. This memory corruption can cause application crashes, unpredictable behavior, or potentially allow an attacker to execute arbitrary code if they can control the input that influences the signed attributes array size.


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?

I don't know


What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability, update wolfSSL to a version that includes the fix for the signedAttribsCount handling issue.

The fix corrects the incrementation of the signedAttribsCount variable to ensure it accurately reflects the number of attributes encoded, preventing buffer overflow and memory corruption.

Ensure that your applications do not allow untrusted input to control the signedAttribs array size when calling wc_PKCS7_EncodeSignedData() or related signing functions.


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