{"id":"CVE-2026-0819","published":"2026-03-19T16:54:33Z","modified":"2026-03-19T17:19:37Z","title":"Stack buffer overflow in PKCS7 SignedData encoding with custom signed attributes","vendor":"wolfSSL","product":"wolfSSL","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":2.2,"severity":"LOW","version":"4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N/E:U","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00115,"percentile":0.01601,"provenance":"source"},"cwes":[{"id":"CWE-121","name":"Stack-based Buffer Overflow"},{"id":"CWE-787","name":"Out-of-bounds Write"}],"references":[{"url":"https://github.com/wolfSSL/wolfssl/pull/9630","tags":[]}],"priority":{"score":1.9,"factors":[{"name":"EPSS percentile","points":0.32},{"name":"CVSS severity","points":1.54}]},"vendorSlug":"wolfssl","affectedVersions":[{"vendor":"wolfSSL","product":"wolfSSL","versions":[">= 5.5.0, < 5.9.0"]}],"solutions":{"items":["Update to the patched version of wolfSSL. The fix adds proper bounds checking in wc_PKCS7_BuildSignedAttributes() to validate that the number of custom signed attributes does not exceed the available space in the fixed-size signedAttribs array, returning BUFFER_E if the limit is exceeded."],"from":"CVE.org CNA","provenance":"source"},"workarounds":{"items":["Ensure that applications using wolfSSL PKCS7 signing functionality validate and limit the number of custom signed attributes (signedAttribsSz) to no more than MAX_SIGNED_ATTRIBS_SZ (default 7) minus the number of default signed attributes enabled. Do not allow untrusted input to control the signedAttribs array or its size."],"from":"CVE.org CNA","provenance":"source"},"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-03-19T17:19:26.928139Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-13131","exploited":false,"provenance":"source"}}