CVEfocus › CVE database › CVE-2021-23840

CVE-2021-23840Integer overflow in CipherUpdate

CVSS 7.5 HighEPSS 51.1% (in the top 1% of all CVEs)Published 2021-02-16Updated 2026-04-16Assigner: openssl

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).

CWE-190

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

44Fixed
7Fix pending
19Not 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 26.04edk2Not affected
vulnerable_code_not_present
Ubuntu 26.04nodejsNot affected
vulnerable_code_not_present
Ubuntu 25.10edk2Not affected
vulnerable_code_not_present
Ubuntu 25.10nodejsNot affected
vulnerable_code_not_present
Ubuntu 24.04edk2Not affected
vulnerable_code_not_present
Ubuntu 24.04nodejsNot affected
vulnerable_code_not_present
Ubuntu 22.04edk2Not affected
vulnerable_code_not_present
Ubuntu 20.04edk2Fixed0~20191122.bd85bf54-2ubuntu3.3UBUNTU-CVE-2021-23840
Ubuntu 20.04opensslFixed1.1.1f-1ubuntu2.2UBUNTU-CVE-2021-23840
Ubuntu 18.04edk2Fix pendingUBUNTU-CVE-2021-23840
Ubuntu 18.04opensslFixed1.1.1-1ubuntu2.1~18.04.8UBUNTU-CVE-2021-23840
Ubuntu 18.04openssl1.0Fixed1.0.2n-1ubuntu5.6UBUNTU-CVE-2021-23840
Ubuntu 16.04edk2Fix pendingUBUNTU-CVE-2021-23840
Ubuntu 16.04nodejsNot affected
vulnerable_code_not_present
Ubuntu 16.04opensslFixed1.0.2g-1ubuntu4.19UBUNTU-CVE-2021-23840
Ubuntu 14.04edk2Fix pending
Ubuntu 14.04opensslFix pending1.0.1f-1ubuntu2.27+esm10 (Ubuntu Pro)UBUNTU-CVE-2021-23840
Debian 14opensslFixed1.1.1j-1DEBIAN-CVE-2021-23840
Debian 13opensslFixed1.1.1j-1DEBIAN-CVE-2021-23840
Debian 12opensslFixed1.1.1j-1DEBIAN-CVE-2021-23840
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-openssl10Not affected
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 7openssl098eNot affected
Red Hat Enterprise Linux 7ovmfFix pending
Affected
Red Hat Enterprise Linux 6opensslNot affected
Red Hat Enterprise Linux 6openssl-develNot affected
Red Hat Enterprise Linux 6openssl-perlNot affected
Red Hat Enterprise Linux 6openssl-staticNot affected
Red Hat Enterprise Linux 6openssl098eNot affected
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-23840
Alpine Linux 3.23opensslFixed1.1.1j-r0ALPINE-CVE-2021-23840
Alpine Linux 3.22opensslFixed1.1.1j-r0ALPINE-CVE-2021-23840
Alpine Linux 3.21opensslFixed1.1.1j-r0ALPINE-CVE-2021-23840
Alpine Linux 3.20opensslFixed1.1.1j-r0ALPINE-CVE-2021-23840
Alpine Linux 3.19opensslFixed1.1.1j-r0ALPINE-CVE-2021-23840
Alpine Linux 3.18opensslFixed1.1.1j-r0ALPINE-CVE-2021-23840
Alpine Linux 3.18openssl1.1-compatFixed1.1.1j-r0ALPINE-CVE-2021-23840
Alpine Linux 3.17opensslFixed1.1.1j-r0ALPINE-CVE-2021-23840
Alpine Linux 3.17openssl1.1-compatFixed1.1.1j-r0ALPINE-CVE-2021-23840
Alpine Linux 3.16opensslFixed1.1.1j-r0ALPINE-CVE-2021-23840
Alpine Linux 3.16openssl3Fixed1.1.1j-r0ALPINE-CVE-2021-23840
Alpine Linux 3.15opensslFixed1.1.1j-r0ALPINE-CVE-2021-23840
Alpine Linux 3.15openssl3Fixed1.1.1j-r0ALPINE-CVE-2021-23840
Alpine Linux 3.14opensslFixed1.1.1j-r0ALPINE-CVE-2021-23840
Alpine Linux 3.13opensslFixed1.1.1j-r0ALPINE-CVE-2021-23840
Alpine Linux 3.12opensslFixed1.1.1j-r0ALPINE-CVE-2021-23840
Alpine Linux 3.11opensslFixed1.1.1j-r0ALPINE-CVE-2021-23840
Alpine Linux 3.10opensslFixed1.1.1j-r0ALPINE-CVE-2021-23840
Alpine Linux 3.9opensslFixed1.1.1j-r0ALPINE-CVE-2021-23840
crates.io libraryopenssl-srcFixed111.14.0GHSA-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.

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.