CVE-2021-23840Integer overflow in CipherUpdate
Calls to EVP_CipherUpdate, EVP_EncryptUpdate and EVP_DecryptUpdate may overflow the output length argument in some cases where the input length is close to the maximum permissable length for an integer on the platform. In such cases the return value from the function call will be 1 (indicating success), but the output length value will be negative. This could cause applications to behave incorrectly or crash. 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
Likely to be exploited: EPSS gives a 51% chance of exploitation in the next 30 days. Treat it as urgent if you run an affected version.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | edk2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 26.04 | nodejs | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | edk2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | nodejs | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | edk2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | nodejs | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | edk2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | edk2 | Fixed | 0~20191122.bd85bf54-2ubuntu3.3 | UBUNTU-CVE-2021-23840 |
| Ubuntu 20.04 | openssl | Fixed | 1.1.1f-1ubuntu2.2 | UBUNTU-CVE-2021-23840 |
| Ubuntu 18.04 | edk2 | Fix pending | UBUNTU-CVE-2021-23840 | |
| Ubuntu 18.04 | openssl | Fixed | 1.1.1-1ubuntu2.1~18.04.8 | UBUNTU-CVE-2021-23840 |
| Ubuntu 18.04 | openssl1.0 | Fixed | 1.0.2n-1ubuntu5.6 | UBUNTU-CVE-2021-23840 |
| Ubuntu 16.04 | edk2 | Fix pending | UBUNTU-CVE-2021-23840 | |
| Ubuntu 16.04 | nodejs | Not affected vulnerable_code_not_present | ||
| Ubuntu 16.04 | openssl | Fixed | 1.0.2g-1ubuntu4.19 | UBUNTU-CVE-2021-23840 |
| Ubuntu 14.04 | edk2 | Fix pending | ||
| Ubuntu 14.04 | openssl | Fix pending | 1.0.1f-1ubuntu2.27+esm10 (Ubuntu Pro) | UBUNTU-CVE-2021-23840 |
| Debian 14 | openssl | Fixed | 1.1.1j-1 | DEBIAN-CVE-2021-23840 |
| Debian 13 | openssl | Fixed | 1.1.1j-1 | DEBIAN-CVE-2021-23840 |
| Debian 12 | openssl | Fixed | 1.1.1j-1 | DEBIAN-CVE-2021-23840 |
| Red Hat Enterprise Linux 9 | openssl | Not affected | ||
| Red Hat Enterprise Linux 9 | openssl-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | openssl-libs | Not affected | ||
| Red Hat Enterprise Linux 9 | openssl-perl | Not affected | ||
| Red Hat Enterprise Linux 8 | compat-openssl10 | Not affected | ||
| Red Hat Enterprise Linux 8 | edk2 | Fixed | 0:20210527gite1999b264f1f-3.el8 | RHSA-2021:4198 |
| Red Hat Enterprise Linux 8 | edk2-aarch64 | Fixed | 0:20210527gite1999b264f1f-3.el8 | RHSA-2021:4198 |
| Red Hat Enterprise Linux 8 | edk2-ovmf | Fixed | 0:20210527gite1999b264f1f-3.el8 | RHSA-2021:4198 |
| Red Hat Enterprise Linux 8 | openssl | Fixed | 1:1.1.1k-4.el8 | RHSA-2021:4424 |
| Red Hat Enterprise Linux 8 | openssl-devel | Fixed | 1:1.1.1k-4.el8 | RHSA-2021:4424 |
| Red Hat Enterprise Linux 8 | openssl-libs | Fixed | 1:1.1.1k-4.el8 | RHSA-2021:4424 |
| Red Hat Enterprise Linux 8 | openssl-perl | Fixed | 1:1.1.1k-4.el8 | RHSA-2021:4424 |
| Red Hat Enterprise Linux 7 | AAVMF | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | OVMF | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | openssl | Fixed | 1:1.0.2k-22.el7_9 | RHSA-2021:3798 |
| Red Hat Enterprise Linux 7 | openssl-devel | Fixed | 1:1.0.2k-22.el7_9 | RHSA-2021:3798 |
| Red Hat Enterprise Linux 7 | openssl-libs | Fixed | 1:1.0.2k-22.el7_9 | RHSA-2021:3798 |
| Red Hat Enterprise Linux 7 | openssl-perl | Fixed | 1:1.0.2k-22.el7_9 | RHSA-2021:3798 |
| Red Hat Enterprise Linux 7 | openssl-static | Fixed | 1:1.0.2k-22.el7_9 | RHSA-2021:3798 |
| Red Hat Enterprise Linux 7 | openssl098e | Not affected | ||
| Red Hat Enterprise Linux 7 | ovmf | Fix pending Affected | ||
| Red Hat Enterprise Linux 6 | openssl | Not affected | ||
| Red Hat Enterprise Linux 6 | openssl-devel | Not affected | ||
| Red Hat Enterprise Linux 6 | openssl-perl | Not affected | ||
| Red Hat Enterprise Linux 6 | openssl-static | Not affected | ||
| Red Hat Enterprise Linux 6 | openssl098e | Not affected | ||
| AlmaLinux 8 | edk2-ovmf | Fixed | 20210527gite1999b264f1f-3.el8 | ALSA-2021:4198 |
| Rocky Linux 8 | edk2 | Fixed | 0:20210527gite1999b264f1f-3.el8 | RLSA-2021:4198 |
| Rocky Linux 8 | openssl | Fixed | 1:1.1.1k-4.el8 | RLSA-2021:4424 |
| Alpine Linux 3.24 | openssl | Fixed | 1.1.1j-r0 | ALPINE-CVE-2021-23840 |
| Alpine Linux 3.23 | openssl | Fixed | 1.1.1j-r0 | ALPINE-CVE-2021-23840 |
| Alpine Linux 3.22 | openssl | Fixed | 1.1.1j-r0 | ALPINE-CVE-2021-23840 |
| Alpine Linux 3.21 | openssl | Fixed | 1.1.1j-r0 | ALPINE-CVE-2021-23840 |
| Alpine Linux 3.20 | openssl | Fixed | 1.1.1j-r0 | ALPINE-CVE-2021-23840 |
| Alpine Linux 3.19 | openssl | Fixed | 1.1.1j-r0 | ALPINE-CVE-2021-23840 |
| Alpine Linux 3.18 | openssl | Fixed | 1.1.1j-r0 | ALPINE-CVE-2021-23840 |
| Alpine Linux 3.18 | openssl1.1-compat | Fixed | 1.1.1j-r0 | ALPINE-CVE-2021-23840 |
| Alpine Linux 3.17 | openssl | Fixed | 1.1.1j-r0 | ALPINE-CVE-2021-23840 |
| Alpine Linux 3.17 | openssl1.1-compat | Fixed | 1.1.1j-r0 | ALPINE-CVE-2021-23840 |
| Alpine Linux 3.16 | openssl | Fixed | 1.1.1j-r0 | ALPINE-CVE-2021-23840 |
| Alpine Linux 3.16 | openssl3 | Fixed | 1.1.1j-r0 | ALPINE-CVE-2021-23840 |
| Alpine Linux 3.15 | openssl | Fixed | 1.1.1j-r0 | ALPINE-CVE-2021-23840 |
| Alpine Linux 3.15 | openssl3 | Fixed | 1.1.1j-r0 | ALPINE-CVE-2021-23840 |
| Alpine Linux 3.14 | openssl | Fixed | 1.1.1j-r0 | ALPINE-CVE-2021-23840 |
| Alpine Linux 3.13 | openssl | Fixed | 1.1.1j-r0 | ALPINE-CVE-2021-23840 |
| Alpine Linux 3.12 | openssl | Fixed | 1.1.1j-r0 | ALPINE-CVE-2021-23840 |
| Alpine Linux 3.11 | openssl | Fixed | 1.1.1j-r0 | ALPINE-CVE-2021-23840 |
| Alpine Linux 3.10 | openssl | Fixed | 1.1.1j-r0 | ALPINE-CVE-2021-23840 |
| Alpine Linux 3.9 | openssl | Fixed | 1.1.1j-r0 | ALPINE-CVE-2021-23840 |
| crates.io library | openssl-src | Fixed | 111.14.0 | GHSA-qgm6-9472-pwq7 |
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.
- OpenSSL: affected: 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)
Vendor advisories:
- https://www.debian.org/security/2021/dsa-4855 (vendor-advisory)
- https://security.gentoo.org/glsa/202103-03 (vendor-advisory)
References
- https://www.openssl.org/news/secadv/20210216.txt
- https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=6a51b9e1d0cf0bf8515f7201b68fb0a3482b3dc1
- https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=9b1129239f3ebb1d1c98ce9ed41d5c9476c47cb2
- https://www.debian.org/security/2021/dsa-4855
- https://security.gentoo.org/glsa/202103-03
- https://www.oracle.com/security-alerts/cpuApr2021.html
- https://www.tenable.com/security/tns-2021-10
- https://www.tenable.com/security/tns-2021-09
- https://security.netapp.com/advisory/ntap-20210219-0009/
- https://www.tenable.com/security/tns-2021-03
- https://lists.apache.org/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e4%40%3Cissues.bookkeeper.apache.org%3E
- https://lists.apache.org/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696b%40%3Cissues.bookkeeper.apache.org%3E
- https://www.oracle.com//security-alerts/cpujul2021.html
- https://kb.pulsesecure.net/articles/Pulse_Security_Advisories/SA44846
- https://www.oracle.com/security-alerts/cpuoct2021.html
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.