OpenSSL Heap Buffer Over-read Vulnerability in ASN.1 Decoder on 64-bit Unix-like Platforms

Vulnerability

A heap buffer over-read vulnerability has been identified in OpenSSL's ASN.1 decoder, specifically in versions 4.0, 3.6, 3.5, 3.4, 3.0, 1.1.1, and 1.0.2. This vulnerability occurs when parsing a crafted DER-encoded ASN.1 structure with a primitive element whose content exceeds 2 gigabytes. The issue is present on 64-bit Unix and Unix-like platforms, while 32-bit platforms and 64-bit Windows are not affected. The root cause lies in an integer truncation that mishandles the length of ASN.1 elements exceeding 2 gigabytes, leading to a buffer over-read that can crash the application or cause it to read into memory beyond the allocated buffer. This vulnerability affects applications that use OpenSSL's d2i_X509(), d2i_PKCS7(), or other d2i_* decoding functions.

Impact

Exploitation of this vulnerability can cause a denial-of-service condition by crashing the application. Additionally, the heap buffer over-read can be manipulated to load contents from memory into the decoded ASN.1 object, potentially leading to information disclosure.

Reproduction

To reproduce this vulnerability, an application must be configured to process ASN.1 data using OpenSSL's decoding functions. The application should be running on a 64-bit Unix or Unix-like platform. Once these conditions are met, a crafted DER-encoded ASN.1 structure can be created, ensuring that the primitive element's content length exceeds 2 gigabytes. This crafted input can then be fed into the application using the vulnerable d2i_* decoding functions, triggering the heap buffer over-read condition.

Remediation

Users of OpenSSL 4.0 should upgrade to OpenSSL 4.0.1. Users of OpenSSL 3.6 should upgrade to OpenSSL 3.6.3. Users of OpenSSL 3.5 should upgrade to OpenSSL 3.5.7. Users of OpenSSL 3.4 should upgrade to OpenSSL 3.4.6. Users of OpenSSL 3.0 should upgrade to OpenSSL 3.0.21. Users of OpenSSL 1.1.1 should upgrade to OpenSSL 1.1.1zh (premium support customers only). Users of OpenSSL 1.0.2 should upgrade to OpenSSL 1.0.2zq (premium support customers only).

Added: Jun 9, 2026, 8:36 PM
Updated: Jun 9, 2026, 8:36 PM

Vulnerability Rating

Custom Algorithm
spread
8.6
impact
3.1
exploitability
8.7
remediation
7.7
relevance
9.3
threat
4.8
urgency
2.9
incentive
8.3

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.