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

Published Apr 9, 2026
·
Updated

A stack buffer overflow exists in wolfSSL's PKCS7 implementation in the wcPKCS7DecryptOri() 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[MAXOIDSZ]) via XMEMCPY without first validating that the parsed OID length does not exceed MAXOIDSZ. 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 wcPKCS7SetOriDecryptCb().

Affected Software

2 affected components
wolfSSL wolfCrypt
wolfSSL wolfssl<5.9.1

Event History

Apr 9, 2026
CVE Published
via MITRE·10:53 PM
Data Sourced
via MITRE·10:53 PM
DescriptionWeakness
Data Sourced
via NVD·11:17 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-5295?

CVE-2026-5295 has been classified as a high severity vulnerability due to the potential for arbitrary code execution.

2

How do I fix CVE-2026-5295?

To resolve CVE-2026-5295, update wolfSSL to version 5.9.1 or later, which contains the necessary patches.

3

What causes the stack buffer overflow in CVE-2026-5295?

The stack buffer overflow in CVE-2026-5295 is caused by processing oversized OIDs in the pkcs7_decryptOri() function.

4

Which versions of wolfSSL are affected by CVE-2026-5295?

CVE-2026-5295 affects wolfSSL versions prior to 5.9.1.

5

Is CVE-2026-5295 specific to certain environments or platforms?

CVE-2026-5295 is not limited to specific environments; it affects all implementations of wolfSSL's PKCS7 module across supported platforms.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203