CVE-2026-120667: Heap Buffer Overflow When Re-Encoding Cached ASN.1 Items Above INT_MAX

Published Dec 1, 2026
·
Updated

Heap Buffer Overflow When Re-Encoding Cached ASN.1 Items Above INTMAX

Other sources

Issue summary: An application that parses a maliciously crafted DER CRL, certificate or CSR from a buffer larger than 4 GiB may trigger a heap buffer overflow when OpenSSL re-encodes the item's cached encoding.

Impact summary: An attacker who supplies a crafted CRL, certificate or CSR to an application that parses untrusted DER from a buffer larger than 4 GiB causes a heap out-of-bounds write of attacker-controlled data, crashing the process: Denial of Service.

CWE: CWE-787: Out-of-bounds Write

Description: ASN1itemi2d() encodes an item in two passes, sizing the buffer first and writing it second. For an item with a cached DER encoding, osslasn1encrestore() reports that length through an int while copying the full long. A cached encoding longer than INTMAX is reported truncated, so the caller allocates a small buffer and the second pass copies the whole span into it.

The cache is kept for the signed parts of CRLs, certificates and CSRs. Parsing a CRL reaches it: d2iX509CRL() fingerprints the CRL and re-encodes that part, and a CRL inside PKCS#7 or CMS triggers it when the container is parsed. Certificates reach it at the first X509verify() or extension-cache fingerprint, CSRs at X509REQverify(). The attacker must supply a DER object whose signed part spans more than 2^32 bytes from a buffer of at least 4 GiB, on a platform with a 64-bit long. TLS, the HTTP CRL fetch, the BIO, PEM, decoder and store readers cap input below 4 GiB.

The oversized copy runs off the end of the heap mapping and the process dies. Nothing is read out of bounds or returned to the attacker, and the fixed overrun size leaves no partial overwrite to steer.

FIPS impact: no The affected code is outside the FIPS module boundary.

— MITRE

Affected Software

3 affected components
OpenSSL OpenSSL
debian/openssl*
debian/openssl<=3.6.5-1

Event History

Dec 1, 2026
CVE Published
via MITRE·04:36 PM
Data Sourced
via MITRE·04:36 PM
DescriptionWeakness
Data Sourced
via OSV·04:36 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:17 PM
DescriptionSeverityWeakness
Data Sourced
via OSV·08:00 PM
Affected Software

Frequently Asked Questions

1

Which applications are exposed?

Applications are exposed if they parse attacker-controlled DER CRLs, certificates, or CSRs from buffers larger than 4 GiB. CRLs can also trigger the issue when parsed inside PKCS#7 or CMS containers; certificates can reach the vulnerable re-encoding path during X509_verify() or extension-cache fingerprinting.

2

What must an attacker be able to provide?

The attacker must be able to supply a malicious DER CRL, certificate, or CSR in a buffer exceeding 4 GiB. The described outcome is an attacker-controlled heap out-of-bounds write that crashes the process, resulting in denial of service.

3

What can be done if an update cannot be applied immediately?

Avoid parsing untrusted DER objects from buffers larger than 4 GiB. Review paths that accept CRLs, certificates, CSRs, and PKCS#7 or CMS containers, and enforce an input-size limit below that condition.

4

How can I determine whether my application is at risk?

Identify whether the application accepts untrusted DER-encoded CRLs, certificates, or CSRs and can hold those inputs in buffers larger than 4 GiB. Also check whether it parses CRLs embedded in PKCS#7 or CMS, or verifies parsed certificates with X509_verify().

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