CVE-2021-23840 Integer overflow in CipherUpdate

High 7.5 Published Updated

An integer overflow in OpenSSL's cipher update functions can cause applications to crash or behave incorrectly when processing large inputs.

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-23840?

CVE-2021-23840 is a high-severity vulnerability in Debian Debian Linux, published on 16 Feb 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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

Weakness: CWE-190

Which versions are affected by CVE-2021-23840?

5 open source packages ship an affected version, including openssl-src, node and node-min. It affects 21 products.

PackageAffectedFixed in
openssl-src crates.ioAll versions111.14.0
openssl-src crates.ioAll versions111.14.0
openssl-src crates.ioFrom 0.0.0-0111.14.0
node BitnamiFrom 10.0.010.12.1, 10.24.0, 12.12.1, 12.21.0, 14.14.1, 14.15.1, 15.10.0
node-min BitnamiFrom 10.0.010.12.1, 10.24.0, 12.12.1, 12.21.0, 14.14.1, 14.15.1, 15.10.0

Products include Debian Debian Linux, Fujitsu M10-1 Firmware, Fujitsu M10-4 Firmware, Fujitsu M10-4s Firmware, Fujitsu M12-1 Firmware, Fujitsu M12-2 Firmware and 15 more.

How do I fix CVE-2021-23840?

Upgrade openssl-src to 111.14.0 or later.

Is CVE-2021-23840 being exploited?

There is no known exploitation of CVE-2021-23840 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

All Debian Debian Linux vulnerabilities

Sources

Also known as ALPINE-CVE-2021-23840, AZL-41976, BIT-node-2021-23840, BIT-node-min-2021-23840, CLEANSTART-2026-AD83127, CLSA-2021-1632261785 and 6 more.

Is CVE-2021-23840 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free