CVE-2021-3712
Read buffer overruns processing ASN.1 strings
Check your servers for CVE-2021-3712
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2021-3712 affects openssl, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
ASN.1 strings are represented internally within OpenSSL as an ASN1_STRING structure which contains a buffer holding the string data and a field holding the buffer length. This contrasts with normal C strings which are repesented as a buffer for the string data which is terminated with a NUL (0) byte. Although not a strict requirement, ASN.1 strings that are parsed using OpenSSL's own "d2i" functions (and other similar parsing functions) as well as any string whose value has been set with the ASN1_STRING_set() function will additionally NUL terminate the byte array in the ASN1_STRING structure. However, it is possible for applications to directly construct valid ASN1_STRING structures which do not NUL terminate the byte array by directly setting the "data" and "length" fields in the ASN1_STRING array. This can also happen by using the ASN1_STRING_set0() function. Numerous OpenSSL functions that print ASN.1 data have been found to assume that the ASN1_STRING byte array will be NUL terminated, even though this is not guaranteed for strings that have been directly constructed. Where an application requests an ASN.1 structure to be printed, and where that ASN.1 structure contains ASN1_STRINGs that have been directly constructed by the application without NUL terminating the "data" field, then a read buffer overrun can occur. The same thing can also occur during name constraints processing of certificates (for example if a certificate has been directly constructed by the application instead of loading it via the OpenSSL parsing functions, and the certificate contains non NUL terminated ASN1_STRING structures). It can also occur in the X509_get1_email(), X509_REQ_get1_email() and X509_get1_ocsp() functions. If a malicious actor can cause an application to directly construct an ASN1_STRING and then process it through one of the affected OpenSSL functions then this issue could be hit. This might result in a crash (causing a Denial of Service attack). It could also result in the disclosure of private memory contents (such as private keys, or sensitive plaintext). Fixed in OpenSSL 1.1.1l (Affected 1.1.1-1.1.1k). Fixed in OpenSSL 1.0.2za (Affected 1.0.2-1.0.2y).
Severity (CVSS)
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- high: an attack depends on conditions outside the control of the attacker, such as a race
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity none, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 48.0%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 98.8% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 16 Apr 2026):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-125 Out-of-bounds Read
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| OpenSSL |
affected Fixed in OpenSSL 1.1.1l (Affected 1.1.1-1.1.1k) affected Fixed in OpenSSL 1.0.2za (Affected 1.0.2-1.0.2y)
|
Is my server affected?
Find the installed version of openssl and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i openssl
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2021-3712 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2021-3712RHEL, Rocky, Alma, Fedora
rpm -q openssl
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2021-3712Alpine
apk list --installed | grep -i opensslWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2021-3712
trivy image --scanners vuln IMAGE | grep CVE-2021-3712
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- DSA-4963 debian.org · vendor advisory
- GLSA-202209-02 security.gentoo.org · vendor advisory
- GLSA-202210-02 security.gentoo.org · vendor advisory
Other references
- https://www.openssl.org/news/secadv/20210824.txt openssl.org
- https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=94d23fcff9b2a7a8368dfe52214d5c2569882c11 git.openssl.org
- https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=ccb0a11145ee72b042d10593a64eaf9e8a55ec12 git.openssl.org
- [tomcat-dev] 20210825 OpenSSL security announcement - do we need a Tomcat Native release? lists.apache.org · mailing list
- [oss-security] 20210825 OpenSSL SM2 Decryption Buffer Overflow (CVE-2021-3711), Read buffer overruns processing… openwall.com · mailing list
- [tomcat-dev] 20210826 Re: OpenSSL security announcement - do we need a Tomcat Native release? lists.apache.org · mailing list
- https://security.netapp.com/advisory/ntap-20210827-0010/ security.netapp.com
- [debian-lts-announce] 20210926 [SECURITY] [DLA 2766-1] openssl security update lists.debian.org · mailing list
- [debian-lts-announce] 20210930 [SECURITY] [DLA 2774-1] openssl1.0 security update lists.debian.org · mailing list
- https://www.oracle.com/security-alerts/cpuoct2021.html oracle.com
- https://www.tenable.com/security/tns-2021-16 tenable.com
- https://kc.mcafee.com/corporate/index?page=content&id=SB10366 kc.mcafee.com
10 more
- https://www.oracle.com/security-alerts/cpujan2022.html oracle.com
- https://www.tenable.com/security/tns-2022-02 tenable.com
- https://www.oracle.com/security-alerts/cpuapr2022.html oracle.com
- https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf cert-portal.siemens.com
- https://cert-portal.siemens.com/productcert/pdf/ssa-244969.pdf cert-portal.siemens.com
- https://security.netapp.com/advisory/ntap-20240621-0006/ security.netapp.com
- https://cert-portal.siemens.com/productcert/html/ssa-244969.html cert-portal.siemens.com
- https://cert-portal.siemens.com/productcert/html/ssa-389290.html cert-portal.siemens.com
- https://cert-portal.siemens.com/productcert/html/ssa-028723.html cert-portal.siemens.com
- https://cert-portal.siemens.com/productcert/html/ssa-019200.html cert-portal.siemens.com
Source: the record CVE-2021-3712 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse