CVEfocus › CVE database › CVE-2021-23841

CVE-2021-23841Null pointer deref in X509_issuer_and_serial_hash()

EPSS 7.5% (higher than 95% of CVEs)Published 2021-02-16Updated 2024-09-16Assigner: openssl

The OpenSSL public API function X509_issuer_and_serial_hash() attempts to create a unique hash value based on the issuer and serial number data contained within an X509 certificate. However it fails to correctly handle any errors that may occur while parsing the issuer field (which might occur if the issuer field is maliciously constructed). This may subsequently result in a NULL pointer deref and a crash leading to a potential denial of service attack. The function X509_issuer_and_serial_hash() is never directly called by OpenSSL itself so applications are only vulnerable if they use this function directly and they use it on certificates that may have been obtained from untrusted sources. OpenSSL versions 1.1.1i and below are affected by this issue. Users of these versions should upgrade to OpenSSL 1.1.1j. OpenSSL versions 1.0.2x and below are affected by this issue. However OpenSSL 1.0.2 is out of support and no longer receiving public updates. Premium support customers of OpenSSL 1.0.2 should upgrade to 1.0.2y. Other users should upgrade to 1.1.1j. Fixed in OpenSSL 1.1.1j (Affected 1.1.1-1.1.1i). Fixed in OpenSSL 1.0.2y (Affected 1.0.2-1.0.2x).

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu, crates.io: see the table below for the fixed version per release.

Red Hat, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

43Fixed
5Fix pending
7Will not fix
6Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 20.04opensslFixed1.1.1f-1ubuntu2.2UBUNTU-CVE-2021-23841
Ubuntu 18.04opensslFixed1.1.1-1ubuntu2.1~18.04.8UBUNTU-CVE-2021-23841
Ubuntu 18.04openssl1.0Fixed1.0.2n-1ubuntu5.6UBUNTU-CVE-2021-23841
Ubuntu 16.04edk2Not affected
vulnerable_code_not_present
Ubuntu 16.04nodejsNot affected
vulnerable_code_not_present
Ubuntu 16.04opensslFixed1.0.2g-1ubuntu4.19UBUNTU-CVE-2021-23841
Ubuntu 14.04edk2Fix pending
Ubuntu 14.04opensslFix pending1.0.1f-1ubuntu2.27+esm2 (Ubuntu Pro)UBUNTU-CVE-2021-23841
Debian 14opensslFixed1.1.1j-1DEBIAN-CVE-2021-23841
Debian 13opensslFixed1.1.1j-1DEBIAN-CVE-2021-23841
Debian 12opensslFixed1.1.1j-1DEBIAN-CVE-2021-23841
Red Hat Enterprise Linux 9opensslNot affected
Red Hat Enterprise Linux 9openssl-develNot affected
Red Hat Enterprise Linux 9openssl-libsNot affected
Red Hat Enterprise Linux 9openssl-perlNot affected
Red Hat Enterprise Linux 8compat-openssl10Will not fix
Will not fix
Red Hat Enterprise Linux 8edk2Fixed0:20210527gite1999b264f1f-3.el8RHSA-2021:4198
Red Hat Enterprise Linux 8edk2-aarch64Fixed0:20210527gite1999b264f1f-3.el8RHSA-2021:4198
Red Hat Enterprise Linux 8edk2-ovmfFixed0:20210527gite1999b264f1f-3.el8RHSA-2021:4198
Red Hat Enterprise Linux 8opensslFixed1:1.1.1k-4.el8RHSA-2021:4424
Red Hat Enterprise Linux 8openssl-develFixed1:1.1.1k-4.el8RHSA-2021:4424
Red Hat Enterprise Linux 8openssl-libsFixed1:1.1.1k-4.el8RHSA-2021:4424
Red Hat Enterprise Linux 8openssl-perlFixed1:1.1.1k-4.el8RHSA-2021:4424
Red Hat Enterprise Linux 7AAVMFFix pending
Affected
Red Hat Enterprise Linux 7OVMFFix pending
Affected
Red Hat Enterprise Linux 7opensslFixed1:1.0.2k-22.el7_9RHSA-2021:3798
Red Hat Enterprise Linux 7openssl-develFixed1:1.0.2k-22.el7_9RHSA-2021:3798
Red Hat Enterprise Linux 7openssl-libsFixed1:1.0.2k-22.el7_9RHSA-2021:3798
Red Hat Enterprise Linux 7openssl-perlFixed1:1.0.2k-22.el7_9RHSA-2021:3798
Red Hat Enterprise Linux 7openssl-staticFixed1:1.0.2k-22.el7_9RHSA-2021:3798
Red Hat Enterprise Linux 7openssl098eWill not fix
Will not fix
Red Hat Enterprise Linux 7ovmfFix pending
Affected
Red Hat Enterprise Linux 6opensslWill not fix
Out of support scope
Red Hat Enterprise Linux 6openssl-develWill not fix
Out of support scope
Red Hat Enterprise Linux 6openssl-perlWill not fix
Out of support scope
Red Hat Enterprise Linux 6openssl-staticWill not fix
Out of support scope
Red Hat Enterprise Linux 6openssl098eWill not fix
Out of support scope
AlmaLinux 8edk2-ovmfFixed20210527gite1999b264f1f-3.el8ALSA-2021:4198
Rocky Linux 8edk2Fixed0:20210527gite1999b264f1f-3.el8RLSA-2021:4198
Rocky Linux 8opensslFixed1:1.1.1k-4.el8RLSA-2021:4424
Alpine Linux 3.24opensslFixed1.1.1j-r0ALPINE-CVE-2021-23841
Alpine Linux 3.23opensslFixed1.1.1j-r0ALPINE-CVE-2021-23841
Alpine Linux 3.22opensslFixed1.1.1j-r0ALPINE-CVE-2021-23841
Alpine Linux 3.21opensslFixed1.1.1j-r0ALPINE-CVE-2021-23841
Alpine Linux 3.20opensslFixed1.1.1j-r0ALPINE-CVE-2021-23841
Alpine Linux 3.19opensslFixed1.1.1j-r0ALPINE-CVE-2021-23841
Alpine Linux 3.18opensslFixed1.1.1j-r0ALPINE-CVE-2021-23841
Alpine Linux 3.18openssl1.1-compatFixed1.1.1j-r0ALPINE-CVE-2021-23841
Alpine Linux 3.17opensslFixed1.1.1j-r0ALPINE-CVE-2021-23841
Alpine Linux 3.17openssl1.1-compatFixed1.1.1j-r0ALPINE-CVE-2021-23841
Alpine Linux 3.16opensslFixed1.1.1j-r0ALPINE-CVE-2021-23841
Alpine Linux 3.16openssl3Fixed1.1.1j-r0ALPINE-CVE-2021-23841
Alpine Linux 3.15opensslFixed1.1.1j-r0ALPINE-CVE-2021-23841
Alpine Linux 3.15openssl3Fixed1.1.1j-r0ALPINE-CVE-2021-23841
Alpine Linux 3.14opensslFixed1.1.1j-r0ALPINE-CVE-2021-23841
Alpine Linux 3.13opensslFixed1.1.1j-r0ALPINE-CVE-2021-23841
Alpine Linux 3.12opensslFixed1.1.1j-r0ALPINE-CVE-2021-23841
Alpine Linux 3.11opensslFixed1.1.1j-r0ALPINE-CVE-2021-23841
Alpine Linux 3.10opensslFixed1.1.1j-r0ALPINE-CVE-2021-23841
Alpine Linux 3.9opensslFixed1.1.1j-r0ALPINE-CVE-2021-23841
crates.io libraryopenssl-srcFixed111.14.0RUSTSEC-2021-0058

What the vendor says

As published in the CVE record by openssl, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.