CVE-2021-41197

MediumCVSS 5.5/10Last modified Jun 17, 2026

Description

TensorFlow is an open source platform for machine learning. In affected versions TensorFlow allows tensor to have a large number of dimensions and each dimension can be as large as desired. However, the total number of elements in a tensor must fit within an `int64_t`. If an overflow occurs, `MultiplyWithoutOverflow` would return a negative result. In the majority of TensorFlow codebase this then results in a `CHECK`-failure. Newer constructs exist which return a `Status` instead of crashing the binary. This is similar to CVE-2021-29584. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.

Metrics

CVSS 3.1 5.5/10CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Weakness enumeration

Affected software

No affected versions have been published.

Timeline

Published
Nov 5, 2021
Last modified
Jun 17, 2026
NVD status
Modified

Related CVEs from 2021

CVE-2021-411985.5TensorFlow is an open source platform for machine learning. In affected versions if `tf.tile` is called with a large input argument then theCVE-2021-411995.5TensorFlow is an open source platform for machine learning. In affected versions if `tf.image.resize` is called with a large input argument CVE-2021-41207.8snapd 2.54.2 fails to perform sufficient validation of snap content interface and layout paths, resulting in the ability for snaps to injectCVE-2021-412005.5TensorFlow is an open source platform for machine learning. In affected versions if `tf.summary.create_file_writer` is called with non-scalaCVE-2021-412017.8TensorFlow is an open source platform for machine learning. In affeced versions during execution, `EinsumHelper::ParseEquation()` is supposeCVE-2021-412025.5TensorFlow is an open source platform for machine learning. In affected versions while calculating the size of the output within the `tf.ranCVE-2021-412037.8TensorFlow is an open source platform for machine learning. In affected versions an attacker can trigger undefined behavior, integer overfloCVE-2021-412045.5TensorFlow is an open source platform for machine learning. In affected versions during TensorFlow's Grappler optimizer phase, constant foldCVE-2021-412057.1TensorFlow is an open source platform for machine learning. In affected versions the shape inference functions for the `QuantizeAndDequantizCVE-2021-412067.8TensorFlow is an open source platform for machine learning. In affected versions several TensorFlow operations are missing validation for thCVE-2021-412075.5TensorFlow is an open source platform for machine learning. In affected versions the implementation of `ParallelConcat` misses some input vaCVE-2021-412087.8TensorFlow is an open source platform for machine learning. In affected versions the code for boosted trees in TensorFlow is still missing v
CVE-2021-41197: Medium severity, CVSS 5.5 | Vulnix