Skip to main content
Menu
CVEs

OpenSSL heap buffer overflow in ASN.1 item re-encoding

Affects OpenSSL 4.0 and 4.1 on platforms with a 64-bit long when re-encoding a cached DER object whose signed part exceeds 2^32 bytes from a buffer of at least 4 GiB. Fixed in 4.1.1 and 4.0.4.

CVE-2026-120667Published December 1, 2026, updated

7.5HighCISA-ADP
Exploited
No known exploitation
Fix
Fixed in 4.1.1, 4.0.4
Who is exposed
Not reported

Summary

OpenSSL has a heap buffer overflow when it re-encodes cached parts of CRLs, certificates and CSRs that are larger than INT_MAX bytes. An attacker who supplies a crafted DER CRL, certificate or CSR, parsed from a buffer larger than 4 GiB, can crash the application that parses it, causing a denial of service.

Written by a model

Original 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.

Who should check

Teams running OpenSSL 4.0 or 4.1 in applications that parse untrusted DER CRLs, certificates or CSRs from buffers over 4 GiB on 64-bit long platforms.

“OpenSSL 4.1 and 4.0 are vulnerable to this issue.”

openssl-library.org

What to do

Upgrade to a fixed version: 4.1.1, 4.0.4.

Check your systems with an agent

Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.

Check whether my systems are affected by CVE-2026-120667 (Heap Buffer Overflow When Re-Encoding Cached ASN.1 Items Above INT_MAX), using the cve.now data below.

Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.

What cve.now has for CVE-2026-120667 (entry last updated 2026-12-01):
Affected:
- OpenSSL OpenSSL: from 4.1.0, fixed in 4.1.1; from 4.0.0, fixed in 4.0.4
Fixed versions: 4.1.1, 4.0.4.
Conditions (all must be true for the bug to be hit):
- Affected versions are OpenSSL 4.1 and 4.0 (source: https://openssl-library.org/news/secadv/20261201.txt)
- Platform with a 64-bit long (source: https://openssl-library.org/news/secadv/20261201.txt)
- Input buffer of at least 4 GiB (source: https://openssl-library.org/news/secadv/20261201.txt)
- DER object whose signed part spans more than 2^32 bytes (source: https://openssl-library.org/news/secadv/20261201.txt)
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
Attacker needs: network access, no login, no user action.
CISA KEV: CVE-2026-120667 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-120667 only. If you also check another CVE, look up its own KEV status; never assume it from this one.

How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.

Verify against the linked advisories before concluding, and cite the date you read each one:
- https://openssl-library.org/news/secadv/20261201.txt
- https://github.com/openssl/openssl/commit/8257d58a42033fd7ea4cc439cddcb0c71a879d47
- https://github.com/openssl/openssl/commit/e70e09fbecc5c1dc2dd159cb63216bf06318e579
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.

Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.

Entry: https://cve.now/CVE-2026-120667
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-120667"}.

Affected versions

cve.now Index

48Pof 100 · provisional · methodology v3
  • Exploitation0/40No signal
  • Exposure20/25No login or user action needed, CISA rates it automatable · Unknown: Advisories don't say whether default setups are affected
  • Reach20/20Affects OpenSSL (software on nearly every server, desktop or phone)
  • Severity7.5/10CVSS 7.5
  • No patch0/5No signal

What would change the score

  • Would score about 93 if added to CISA KEV
  • Would score about 88 if CISA's SSVC rates exploitation active
  • Would score about 53 if advisories confirm default setups are exposed

Timeline

  1. CVE published
  2. First seen by cve.now
  3. CISA SSVC assessment

    Exploitation: none · Automatable: yes · Technical impact: partial

  4. Record last updated
  5. Posted on X by cve.now

Evidence 5

KindSource
Vendor advisory 1Establishes: Affected and fixed versions.
Advisoryopenssl-library.org · news/secadv/20261201.txt
CVE record 2Establishes: The identifier and description.
RecordCVE List · CVE-2026-120667
RecordNVD · CVE-2026-120667
Other links 2
PatchGitHub · openssl/openssl · Commit 8257d58a
PatchGitHub · openssl/openssl · Commit e70e09fb

Questions about CVE-2026-120667

Is CVE-2026-120667 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: cve.now feed data

What does this mean?

Re-encoding a cached ASN.1 item larger than INT_MAX can write past the end of a heap buffer. The out-of-bounds write of attacker-controlled data can crash the process, causing a denial of service.

Source: openssl-library.org

Which versions are affected by CVE-2026-120667?

OpenSSL: from 4.1.0 before 4.1.1; from 4.0.0 before 4.0.4.

Source: cve.now feed data

Am I affected, and how do I check?

OpenSSL 4.1 and 4.0 are affected, but only on a platform with a 64-bit long, when the input buffer is at least 4 GiB and the DER object's signed part spans more than 2^32 bytes. To check the version, run openssl version and compare it with the fixed releases.

Source: openssl-library.org

How do I fix CVE-2026-120667?

Upgrade to OpenSSL 4.1.1 on the 4.1 line or OpenSSL 4.0.4 on the 4.0 line.

Source: openssl-library.org

No corrections so far. Something wrong on this page? Report an error.