When OpenSSL has already parsed a DER object it keeps the original bytes of its signed part so it can re-emit them without re-encoding, and ossl_asn1_enc_restore() hands that cached length back to ASN1_item_i2d() through an int while the copy itself uses the full long. A cached encoding longer than INT_MAX is therefore reported truncated: the first pass allocates a small buffer and the second pass copies the whole span into it, a heap out-of-bounds write of attacker-controlled bytes. It takes a CRL, certificate or CSR whose signed part spans more than 232 bytes, parsed from a buffer of at least 4 GiB on a 64-bit platform, and only OpenSSL 4.0.0–4.0.3 and 4.1.0 are affected. CISA scores it 7.5 (availability only); OpenSSL rates it Moderate. The fix commits are merged and 4.1.1 and 4.0.4 are the fixed versions, but on 1 December the downloads page still offered 4.1.0 and 4.0.3. If you built OpenSSL 4.0 or 4.1 from source, take 4.1.1 or 4.0.4 as soon as it is released, and until then do not feed multi-gigabyte DER from untrusted sources to d2i_X509_CRL(), X509_verify() or X509_REQ_verify().
CVE-2026-120667 at a glance.
| Component | OpenSSL, the ASN.1 encoder (ASN1_item_i2d() and the cached-encoding restore in crypto/asn1/tasn_utl.c) as reached by CRL, certificate and CSR parsing and verification |
| Affected versions | OpenSSL 4.1.0 and 4.0.0 to 4.0.3, per the OpenSSL CNA record. The record lists no 3.x range, so the 3.5 LTS line, 3.0 and the Extended-LTS 1.1.1 and 1.0.2 lines are not named as affected |
| Fixed in | 4.1.1 and 4.0.4 per the record and the project’s vulnerabilities page; the 4.1 fix commit 8257d58a (“asn1: reject cached encodings longer than INT_MAX”, merged 30 November 2026, crypto/asn1/tasn_utl.c plus a test) was read, and e70e09fb is named for 4.0. Neither release was on openssl-library.org/source on 1 December 2026, which still listed 4.1.0 (23 October) and 4.0.3 (29 September); the 1 December advisory file returned a client error |
| Severity | OpenSSL: Moderate. CISA ADP CVSS 3.1 7.5 High (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H), CWE-787 (out-of-bounds write); SSVC Exploitation none, Automatable yes, Technical Impact partial. NVD Received with the ADP score. The record says the overrun is a fixed size that runs off the heap mapping, nothing is read back and “the fixed overrun size leaves no partial overwrite to steer”, hence denial of service rather than code execution |
| Exploited in the wild | Not on the CISA KEV catalogue (2026.11.30). EPSS: no score yet on 1 December 2026 |
| Who is exposed | Applications built on OpenSSL 4.0 or 4.1 that parse untrusted DER CRLs, certificates or CSRs from a memory buffer of 4 GiB or more on a platform with a 64-bit long: d2i_X509_CRL() reaches the cache at once, a CRL inside PKCS#7 or CMS reaches it when the container is parsed, certificates at the first X509_verify() or extension-cache fingerprint, CSRs at X509_REQ_verify(). The record says TLS, the HTTP CRL fetch, and the BIO, PEM, decoder and store readers cap input below 4 GiB, so the stock openssl command and TLS peers are not a path |
| Published | CVE record and vulnerabilities-page entry 1 December 2026 (fix merged 30 November); this page built 1 December 2026, last updated 1 December 2026 |
What it is
ASN1_item_i2d() works in two passes: the first with a NULL output pointer to learn the encoded length and size a buffer, the second to write into it. An item that was parsed from DER keeps its original signed bytes in an encoding cache, so the second pass can copy them rather than re-encode, and ossl_asn1_enc_restore() is the function that reports the cached length and does the copy. It reports the length through an int and copies the full long. For a cached encoding longer than INT_MAX the two disagree: the reported length is the truncated value, the caller allocates that much, and the copy writes the whole span. The result is a heap overflow by the difference, with the attacker’s DER as the data written.
The cache is kept for the signed parts of CRLs, certificates and CSRs, which is why those are the three objects named. A CRL reaches the bug as soon as it is parsed, because d2i_X509_CRL() fingerprints the CRL and re-encodes the signed part to do so; a CRL carried inside a PKCS#7 or CMS container is reached when the container is parsed. A certificate reaches it at its first X509_verify() or at the extension-cache fingerprint, a CSR at X509_REQ_verify(). The precondition is the awkward part for an attacker: the signed part must span more than 232 bytes, which means the object is handed to OpenSSL from a buffer of at least 4 GiB, and the platform must have a 64-bit long (every 64-bit Linux does). The library’s own readers do not get there: TLS, the HTTP CRL fetcher, and the BIO, PEM, OSSL_DECODER and OSSL_STORE paths all cap their input below 4 GiB. Only an application that reads a multi-gigabyte DER blob into memory itself and calls the d2i_ or verify functions on it is exposed.
The fix, “asn1: reject cached encodings longer than INT_MAX” (commit 8257d58a by Nikola Pajkovsky, merged 30 November, 17 lines in crypto/asn1/tasn_utl.c and a 135-line test in test/x509_internal_test.c), refuses to save an oversized encoding into the cache and bypasses an oversized cache on restore, so an item that large is re-encoded from its parsed fields instead. OpenSSL’s own rating is Moderate on the grounds that the attacker gets a crash and nothing else; CISA’s 7.5 is the generic network-reachable availability score. This is one of four CVEs in OpenSSL’s 1 December set with CVE-2026-123780 (ECH transcript growth), CVE-2026-120665 (ECH public-name verification bypass) and CVE-2026-120666 (AES-SIV late AAD), all fixed in 4.1.1 and 4.0.4; the advisory text itself could not be read on 1 December, so the per-CVE facts here are from the CVE records, the vulnerabilities page and the commit.
Who is affected on Linux
Each row is what the distribution’s own security tracker said on 1 December 2026; the link in the row is the tracker page, which will be newer than this one. Every row below is the state for this CVE on OpenSSL 4.x; no distribution listed here ships OpenSSL 4.0 or 4.1 as a system library on 1 December 2026, as far as their own pages show, and the trackers for this id were unreachable.
| Distribution | Status | Fixed package |
|---|---|---|
| Alpine | Not consulted on 1 December 2026; nothing inferred | — |
| Debian | Tracker unreachable on 1 December 2026 (client error); nothing inferred for this id. Debian’s page for the companion CVE-2026-35190 shows bookworm on 3.0, trixie on 3.5 and forky/sid on 3.6.5, none on the affected 4.x lines | — |
| Ubuntu | Tracker unreachable on 1 December 2026 (server error, two attempts); nothing inferred | — |
| RHEL, Rocky, Alma, CentOS Stream | Red Hat page and hydra JSON unreachable on 1 December 2026 (client error); nothing inferred. Red Hat’s page for CVE-2026-35190 places RHEL 10 on the 3.5 line and RHEL 8 and 9 below it | — |
| SUSE · Fedora · Arch | SUSE’s page returned an empty body on 1 December 2026; Fedora and Arch not consulted | — |
| Source builds, vendored copies, containers | The upstream fix applies: 4.1.0 and 4.0.0–4.0.3 are affected, nothing older | OpenSSL 4.1.1 or 4.0.4 when released; until then commit 8257d58a (4.1) or e70e09fb (4.0) |
How to check
Three questions, in order: is a 4.0 or 4.1 OpenSSL on the host at all (system packages are 3.x, so this means a source build or a bundled copy), does any program load it, and does any of those programs parse DER CRLs, certificates or CSRs from memory buffers it fills itself rather than through OpenSSL’s own readers. The last one is a code question and the commands can only point at candidates.
# 1. system OpenSSL (3.x is not in the affected range)
openssl version
dpkg -l 'libssl*' 2>/dev/null | grep '^ii' || rpm -q openssl-libs openssl
# 2. any 4.x libcrypto on the host, including source builds and bundled copies
find / -xdev \( -name "libcrypto.so.4*" -o -name "libcrypto.so.4" \) 2>/dev/null
for f in $(find / -xdev -name "libcrypto.so*" 2>/dev/null); do printf "%s: " "$f"; strings -n 8 "$f" | grep -m1 -oE "OpenSSL [0-9]+\.[0-9]+\.[0-9]+[a-z]*"; done
# 3. which running processes have a 4.x libcrypto mapped
sudo grep -l "libcrypto.so.4" /proc/[0-9]*/maps 2>/dev/null | cut -d/ -f3 | sort -u | xargs -r ps -o pid,comm,args -p
# 4. candidates: binaries that import the DER parsers or verifiers the record names
for b in $(sudo grep -l "libcrypto.so.4" /proc/[0-9]*/maps 2>/dev/null | cut -d/ -f3 | sort -u | xargs -r -I{} readlink /proc/{}/exe | sort -u); do
nm -D "$b" 2>/dev/null | grep -Eq " U (d2i_X509_CRL|X509_verify|X509_REQ_verify|d2i_PKCS7|d2i_CMS_ContentInfo)" && echo "$b"
doneIf step 2 finds no libcrypto.so.4, the host runs no affected OpenSSL and there is nothing to do. If it does, step 3 says which processes carry it and step 4 which of those call the entry points that reach the cache; a program on that list is exposed only if it hands those functions a buffer of 4 GiB or more that an outsider filled, which is a question for its source. Because the overrun ends in a crash and nothing is returned, the sign of an attempt after the fact is a process that died with a segmentation fault while parsing a very large CRL or certificate; journalctl -k | grep segfault and the service’s own log around the crash are where to look.
How to fix it
For a source build, rebuild from 4.1.1 or 4.0.4 when the release appears, or apply the fix commit to your checkout now, and restart every process that has the library mapped. Distribution packages are on the 3.x lines and need nothing for this CVE.
# source build: rebuild when 4.1.1 / 4.0.4 is on https://openssl-library.org/source/
curl -O https://github.com/openssl/openssl/releases/download/openssl-4.1.1/openssl-4.1.1.tar.gz # once released
# or cherry-pick the fix onto a 4.1 checkout now
git -C openssl fetch origin && git -C openssl cherry-pick 8257d58a42033fd7ea4cc439cddcb0c71a879d47
# (4.0 branch: e70e09fbecc5c1dc2dd159cb63216bf06318e579)
./Configure && make -j"$(nproc)" && make test && sudo make install_sw
# then restart everything that still has the old library mapped
sudo grep -l "libcrypto.so.4" /proc/[0-9]*/maps 2>/dev/null | cut -d/ -f3 | sort -u | xargs -r ps -o pid,comm -pThe record gives no workaround and none is needed for most hosts, because the precondition is a 4 GiB input that OpenSSL’s own readers never produce. An application that does read whole files into memory before parsing can refuse inputs above a sane size, which is the control until the rebuild; a CRL or certificate measured in gigabytes is not a legitimate one. What not to do: do not read “OpenSSL heap overflow, 7.5” as a reason to patch 3.x systems in a hurry, since the record names only 4.0 and 4.1 and the FIPS module is outside the affected code; and do not assume the downloads page will carry 4.1.1 the moment the CVE is published, since on 1 December it still listed 4.1.0 and the release advisory file was not yet served.
Sources
- CVE-2026-120667 at CVE.org — the OpenSSL CNA record (1 December 2026): the two-pass encoder, the int/long truncation, the three object types and their entry points, the 4 GiB and 64-bit preconditions, the readers that cap input, Moderate, no FIPS impact, affected 4.1.0 and 4.0.0–4.0.3, credits Bhabani Sankar Das and Nikola Pajkovsky
- OpenSSL vulnerabilities page — the 1 December 2026 entry: Moderate, fixed in 4.1.1 (commit 8257d58a) and 4.0.4 (commit e70e09fb)
- Commit 8257d58a — “asn1: reject cached encodings longer than INT_MAX”, merged 30 November 2026,
crypto/asn1/tasn_utl.c(+17 −2) andtest/x509_internal_test.c(+135); reviewed by Norbert Pocs and Saša Nedvědický - openssl-library.org/source — on 1 December 2026 still 4.1.0 (23 October 2026), 4.0.3 and 3.5.9 (29 September 2026); the advisory file
secadv/20261201.txtreturned a client error - NVD entry — Received; published 1 December 2026; CISA ADP CVSS 3.1 7.5 and SSVC; CWE-787; no CPEs
- Distribution trackers: Debian, Red Hat (client error), Ubuntu (server error) and SUSE (empty page) on 1 December 2026; the companion pages for CVE-2026-35190 give the packaged OpenSSL lines quoted above
- CISA KEV catalogue 2026.11.30, not listed · EPSS no score on 1 December 2026
Related reading
- CVE-2026-123780: OpenSSL servers keep every ClientHello in an ECH transcript buffer that never shrinks — the same 1 December set, the one that reaches default-configuration servers
- CVE-2026-120665: OpenSSL ECH clients accept the public-name certificate after a HelloRetryRequest — the same set, forthcoming as
cve-2026-120665-openssl-ech-public-name-bypass - CVE-2026-120666: OpenSSL AES-SIV ignores additional authenticated data supplied after the plaintext — the same set, forthcoming as
cve-2026-120666-openssl-aes-siv-late-aad - CVE-2026-121481: OpenSSL EVP_EncodeBlock() overflows its output-size arithmetic near 2 GiB — the other int-versus-size overflow in the same month
- CVE-2026-107493: OpenSSL PEM X509_INFO use-after-free — the 17 November set, also waiting on the same 4.1.1 / 4.0.4 / 3.5.10 releases
- Security advisories — every Linux-relevant CVE we track, newest first, with the component index
This advisory page was assembled from the primary sources listed above on 1 December 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.
