CVE-2026-22796: ASN1_TYPE Type Confusion in the PKCS7_digest_from_attributes() function
Issue summary: A type confusion vulnerability exists in the signature verification of signed PKCS#7 data where an ASN1TYPE union member is accessed without first validating the type, causing an invalid or NULL pointer dereference when processing malformed PKCS#7 data.
Impact summary: An application performing signature verification of PKCS#7 data or calling directly the PKCS7digestfromattributes() function can be caused to dereference an invalid or NULL pointer when reading, resulting in a Denial of Service.
The function PKCS7digestfromattributes() accesses the message digest attribute value without validating its type. When the type is not VASN1OCTETSTRING, this results in accessing invalid memory through the ASN1TYPE union, causing a crash.
Exploiting this vulnerability requires an attacker to provide a malformed signed PKCS#7 to an application that verifies it. The impact of the exploit is just a Denial of Service, the PKCS7 API is legacy and applications should be using the CMS API instead. For these reasons the issue was assessed as Low severity.
The FIPS modules in 3.5, 3.4, 3.3 and 3.0 are not affected by this issue, as the PKCS#7 parsing implementation is outside the OpenSSL FIPS module boundary.
OpenSSL 3.6, 3.5, 3.4, 3.3, 3.0, 1.1.1 and 1.0.2 are vulnerable to this issue.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
OpenSSLto a version that resolves this vulnerability.Fixed in 1.0.2zn - Upgrade
Upgrade
OpenSSLto a version that resolves this vulnerability.Fixed in 1.1.1ze - Upgrade
Upgrade
OpenSSLto a version that resolves this vulnerability.Fixed in 3.0.19 - Upgrade
Upgrade
OpenSSLto a version that resolves this vulnerability.Fixed in 3.3.6 - Upgrade
Upgrade
OpenSSLto a version that resolves this vulnerability.Fixed in 3.4.4 - Upgrade
Upgrade
OpenSSLto a version that resolves this vulnerability.Fixed in 3.5.5 - Upgrade
Upgrade
OpenSSLto a version that resolves this vulnerability.Fixed in 3.6.1 - Compensating control
If feasible, avoid using the legacy PKCS#7 API for signature verification; instead use the CMS API (the material notes applications should be using the CMS API instead).
Event History
Frequently Asked Questions
What is the severity of CVE-2026-22796?
CVE-2026-22796 is classified as a high severity vulnerability due to the potential for type confusion resulting in application crashes or arbitrary code execution.
How do I fix CVE-2026-22796?
You can fix CVE-2026-22796 by updating OpenSSL to a version that includes the patches addressing the ASN1_TYPE type confusion.
Which versions of OpenSSL are affected by CVE-2026-22796?
CVE-2026-22796 affects OpenSSL versions from 1.0.2 to 3.6, inclusive.
What is the impact of CVE-2026-22796 on applications?
The impact of CVE-2026-22796 can lead to crashes or unexpected behavior in applications that rely on PKCS#7 signature verification.
What is the nature of the vulnerability in CVE-2026-22796?
CVE-2026-22796 is a type confusion vulnerability that occurs when an ASN1_TYPE union member is accessed without proper type validation.