CVE-2021-23841 Null pointer deref in X509_issuer_and_serial_hash()
Attackers can cause a denial of service via null pointer dereference in OpenSSL's X509_issuer_and_serial_hash function when processing malicious certificates.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-23841?
CVE-2021-23841 is a medium-severity vulnerability in Apple Ipados, published on 16 Feb 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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).
Weakness: CWE-476
Which versions are affected by CVE-2021-23841?
3 open source packages ship an affected version, including openssl-src. It affects 23 products.
| Package | Affected | Fixed in |
|---|---|---|
openssl-src crates.io | All versions | 111.14.0 |
openssl-src crates.io | All versions | 111.14.0 |
openssl-src crates.io | From 0.0.0-0 | 111.14.0 |
Products include Apple Ipados, Apple Iphone Os, Apple Macos, Apple Safari, Debian Debian Linux, Netapp Oncommand Insight and 17 more.
How do I fix CVE-2021-23841?
Upgrade openssl-src to 111.14.0 or later.
Is CVE-2021-23841 being exploited?
There is no known exploitation of CVE-2021-23841 in the wild and no public exploit code.
Public exploit code: 2 proofs of concept on GitHub.
Other vulnerabilities in Apple Ipados
- CVE-2025-43300 Apple iOS, iPadOS, and macOS Out-of-Bounds Write
- CVE-2025-24201 Apple Multiple Products WebKit Out-of-Bounds Write
- CVE-2025-24085 Apple Multiple Products Use-After-Free
- CVE-2025-31200 Apple Multiple Products Memory Corruption
- CVE-2025-31201 Apple Multiple Products Arbitrary Read and Write
Sources
Also known as ALPINE-CVE-2021-23841, AZL-40768, AZL-41571, CLEANSTART-2026-ON27982, CLSA-2021-1614885634, DEBIAN-CVE-2021-23841 and 4 more.