Summary
In OpenSSL (versions 4.0.0 through 4.0.3 and 4.1.0), ASN1_item_i2d() re-encoding the cached DER encoding of the signed part of a CRL, certificate or CSR reports the length through an int while copying the full long. If the encoding exceeds INT_MAX, an undersized buffer is allocated and an out-of-bounds write occurs (CWE-787).
CVSS 7.5: exploitable over the network, without authentication or user interaction, resulting in denial of service (process crash). Preconditions are narrow: the application must parse untrusted DER from a buffer of at least 4 GiB, the signed part must exceed 2^32 bytes, and the platform must have a 64-bit long. TLS, HTTP CRL fetch, and the BIO, PEM, decoder and store readers cap input below 4 GiB.
Nothing is read out of bounds or returned to the attacker, and the fixed overrun size leaves no steerable partial overwrite. The FIPS module is not affected. The issue is not listed in CISA KEV.
Who is affected
Organizations running OpenSSL 4.0.x (before 4.0.4) or 4.1.0 in applications that directly parse very large untrusted DER CRLs, certificates, CSRs or PKCS#7/CMS containers.
What to do
- Upgrade OpenSSL to 4.1.1 (4.1 branch) or 4.0.4 (4.0 branch).
- Inventory systems and applications using OpenSSL 4.0.0–4.0.3 or 4.1.0, including statically linked and bundled copies.
- Check whether your applications parse untrusted DER objects (d2i_X509_CRL, PKCS#7/CMS, X509_verify, X509_REQ_verify) from buffers of 4 GiB or more, and enforce input size limits.
- Follow the official advisory (openssl-library.org/news/secadv/20261201.txt) and your distribution's updates.
Affected products and versions
CVSS vector, explained
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Attack vector
- Network (from the internet)
- Attack complexity
- Low
- Privileges required
- None (no login)
- User interaction
- Not required
- Scope
- Vulnerable component only
- Confidentiality
- None
- Integrity
- None
- Availability
- High impact
Weakness type (CWE)
- CWE-787 Out-of-bounds Write
References
- openssl-library.org/news/secadv/20261201.txt vendor advisory
- github.com/openssl/openssl/commit/8257d58a42033fd7ea4cc439cddcb0c71a879d47 patch
- github.com/openssl/openssl/commit/e70e09fbecc5c1dc2dd159cb63216bf06318e579 patch
Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.