{"id":"CVE-2026-5295","aliases":["CVE-2026-5295"],"related":[],"kind":"vulnerability","state":"published","title":"Stack Buffer Overflow in wolfSSL PKCS7 wc_PKCS7_DecryptOri() via Oversized OID","summary":"A stack buffer overflow exists in wolfSSL's PKCS7 implementation in the wc_PKCS7_DecryptOri() function in wolfcrypt/src/pkcs7.c. When processing a CMS EnvelopedData message containing an OtherRecipientInfo (ORI) recipient, the function copies an ASN.1-parsed OID into a fixed 32-byte stack buffer (oriOID[MAX_OID_SZ]) via XMEMCPY without first validating that the parsed OID length does not exceed MAX_OID_SZ. A crafted CMS EnvelopedData message with an ORI recipient containing an OID longer than 32 bytes triggers a stack buffer overflow. Exploitation requires the library to be built with --enable-pkcs7 (disabled by default) and the application to have registered an ORI decrypt callback via wc_PKCS7_SetOriDecryptCb().","summarySource":"cvelist","descriptions":[{"lang":"en","text":"A stack buffer overflow exists in wolfSSL's PKCS7 implementation in the wc_PKCS7_DecryptOri() function in wolfcrypt/src/pkcs7.c. When processing a CMS EnvelopedData message containing an OtherRecipientInfo (ORI) recipient, the function copies an ASN.1-parsed OID into a fixed 32-byte stack buffer (oriOID[MAX_OID_SZ]) via XMEMCPY without first validating that the parsed OID length does not exceed MAX_OID_SZ. A crafted CMS EnvelopedData message with an ORI recipient containing an OID longer than 32 bytes triggers a stack buffer overflow. Exploitation requires the library to be built with --enable-pkcs7 (disabled by default) and the application to have registered an ORI decrypt callback via wc_PKCS7_SetOriDecryptCb().","source":"cvelist"}],"published":"2026-04-09T22:53:10.635Z","modified":"2026-06-17T10:58:46.407Z","severity":{"scorer":"wolfSSL","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:A/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"wolfSSL","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:A/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N","score":5.9,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:A/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8,"rating":"HIGH"}],"cwes":["CWE-121"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"5.9.1","status":"affected"}],"vendor":"wolfSSL","product":"wolfSSL","repo":"https://github.com/wolfSSL/wolfssl","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"5.9.1"}],"vendor":"wolfssl","product":"wolfssl","cpe":"cpe:2.3:a:wolfssl:wolfssl:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/wolfSSL/wolfssl/pull/10116","tags":["issue-tracking","patch"],"sources":["cvelist","nvd"]}],"credits":["Sunwoo Lee, (Korea Institute of Energy Technology, KENTECH)","Woohyun Choi, (Korea Institute of Energy Technology, KENTECH)","Seunghyun Yoon, (Korea Institute of Energy Technology, KENTECH)"],"assigner":"wolfSSL","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-04-14T14:32:50.288Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-5295","url":"https://www.cve.org/CVERecord?id=CVE-2026-5295","licence":"CVE Terms of Use","modified":"2026-04-14T14:32:57.454Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-5295","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-5295","licence":"Public domain","modified":"2026-06-17T10:58:46.407Z"}],"updatedAt":"2026-11-25T22:59:18.465Z","epss":{"score":0.00175,"percentile":0.07243,"date":"2026-12-01T12:00:22.000Z"}}