cve.bz

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

no score yetFix available

openssl openssl: no CVSS score yet.

On this page
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.
CWE
CWE-787 Out-of-bounds Write
Published
Assigned by
openssl (CNA)
NVD analysis
Not in the NVD yet
Record from
the CVE List, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-120667 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-120667?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-120667?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-120667 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
OpenSSLfrom 4.1.0 before 4.1.1
OpenSSLfrom 4.0.0 before 4.0.4

References

Check your stackJSON