{"id":"CVE-2026-0819","summary":"Stack buffer overflow in PKCS7 SignedData encoding with custom signed attributes","details":"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-\u003esignedAttribsCount) to EncodeAttributes() instead of the remaining available space in the fixed-size signedAttribs[7] array. When an application sets pkcs7-\u003esignedAttribsSz 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.","modified":"2026-07-16T03:48:10.712614159Z","published":"2026-03-19T16:54:33.442Z","database_specific":{"cwe_ids":["CWE-121","CWE-787"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/0xxx/CVE-2026-0819.json","cna_assigner":"wolfSSL"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/0xxx/CVE-2026-0819.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-0819"},{"type":"FIX","url":"https://github.com/wolfSSL/wolfssl/pull/9630"},{"type":"PACKAGE","url":"https://github.com/wolfSSL/wolfssl"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/wolfssl/wolfssl","events":[{"introduced":"44f81f8bc082319cebf0e37df8470aa5748c1355"},{"fixed":"922d04b3568c6428a9fb905ddee3ef5a68db3108"}],"database_specific":{"cpe":"cpe:2.3:a:wolfssl:wolfssl:*:*:*:*:*:*:*:*","extracted_events":[{"introduced":"5.5.0"},{"fixed":"5.9.0"}],"source":["AFFECTED_FIELD","CPE_RANGE"]}}],"versions":["v5.8.4-stable","wolfEntropy2d","v5.8.2-stable","wolfEntropy1","v5.8.0-stable","v5.7.6-stable","v5.7.4-stable","v5.2.1","v5.7.2-stable","v5.7.0-stable","v5.6.6-stable","v5.6.4-stable","v5.6.2-stable","v5.6.3-stable","v5.6.0-stable","v5.5.4-stable","v5.5.3-stable","v5.5.2-stable","v5.5.1-stable","v5.5.0-stable"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-0819.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V4","score":"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"}]}