CVE-2026-120667

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

Published Dec 1, 2026 CVSS 3.1 · 7.5 High EPSS n/a KEV · Not listed
Description
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: ASN1_item_i2d() encodes an item in two passes, sizing the buffer
first and writing it second. For an item with a cached DER encoding,
ossl_asn1_enc_restore() reports that length through an int while copying the
full long. A cached encoding longer than INT_MAX 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: d2i_X509_CRL() 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 X509_verify() or extension-cache
fingerprint, CSRs at X509_REQ_verify(). 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.

Analysis

AI-generated

Technical impact

A heap buffer overflow can be triggered when OpenSSL re-encodes a DER object that exceeds 4 GiB in size; the first pass reports a size that is truncated to an int and the second pass copies the full long length, causing an out‑of‑bounds write. The vulnerability is an out‑of‑bounds write (CWE‑787) that results in a process crash and denies service to the affected application.

Affected Systems

The issue resides in the OpenSSL library, affecting any build that parses DER encoded CRLs, certificates, or CSRs and uses the ASN1_item_i2d function. No specific version information is provided, but any OpenSSL deployment that steps through X509 verification or CRL parsing may be impacted.

Risk and Exploitability

The CVSS severity of 7.5 indicates high severity, while the EPSS score is not available and the vulnerability is not listed in CISA KEV. Because exploitation requires a crafted DER object larger than 4 GiB and a 64‑bit platform, the likelihood of successful attacks in the wild is limited but not negligible. An attacker who can supply such a payload to a vulnerable application could cause a denial of service.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the current OpenSSL patch that addresses the overflow bug
  • Ensure the OpenSSL library in your environment is at a post‑patch release
  • If immediate upgrade is infeasible, configure applications to reject DER objects larger than 4 GiB or disable CRL, certificate, and CSR parsing from untrusted sources

Generated by OpenCVE AI on December 1, 2026 at 22:26 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Type Values Removed Values Added
Description 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: ASN1_item_i2d() encodes an item in two passes, sizing the buffer first and writing it second. For an item with a cached DER encoding, ossl_asn1_enc_restore() reports that length through an int while copying the full long. A cached encoding longer than INT_MAX 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: d2i_X509_CRL() 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 X509_verify() or extension-cache fingerprint, CSRs at X509_REQ_verify(). 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.
Title Heap Buffer Overflow When Re-Encoding Cached ASN.1 Items Above INT_MAX
Weaknesses CWE-787
References

Subscriptions

No data.

Weaknesses

Sources

Status
PUBLISHED
Assigner
openssl
Published
Updated
Dec 1, 2026, 4:52 PM
Reserved
Nov 2, 2026, 6:47 PM
Status
Received
Published
Dec 1, 2026, 5:17 PM
Modified
Dec 1, 2026, 5:17 PM