# CVE-2026-5295: Stack Buffer Overflow in wolfSSL PKCS7 wc_PKCS7_DecryptOri() via Oversized OID

- Severity: Medium 5.9 (CVSS:4.0, scored by wolfSSL) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 7% of CVEs (2026-12-01)
- Published: 2026-04-09T22:53:10.635Z
- Modified: 2026-06-17T10:58:46.407Z
- Weaknesses: CWE-121
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: wolfSSL

## Description

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().

(As written by CVE List.)

## Affected

- wolfSSL wolfSSL: before 5.9.1

## Every score

- wolfSSL: CVSS:4.0 5.9 Medium `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`
- NVD: CVSS:3.1 8.0 High `CVSS:3.1/AV:A/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://github.com/wolfSSL/wolfssl/pull/10116> (issue-tracking, patch)

## Sources

- CVE List: [CVE-2026-5295](https://www.cve.org/CVERecord?id=CVE-2026-5295), CVE Terms of Use, modified 2026-04-14
- NVD: [CVE-2026-5295](https://nvd.nist.gov/vuln/detail/CVE-2026-5295), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-5295 · Whole record: https://cve.day/CVE-2026-5295.json · Rebuilt by cve.day 2026-11-25T22:59:18.465Z
