CVE-2021-29611
JSON

3.6low

Incomplete validation in `SparseReshape`

Severity
3.6low CVSS:3.1 by GitHub_M
Exploit likelihood
0.20% (higher than 10% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-9rpc-5v9q-5r7fBIT-TENSORFLOW-2021-29611PYSEC-2021-248PYSEC-2021-539PYSEC-2021-737

Description

TensorFlow is an end-to-end open source platform for machine learning. Incomplete validation in `SparseReshape` results in a denial of service based on a `CHECK`-failure. The implementation(https://github.com/tensorflow/tensorflow/blob/e87b51ce05c3eb172065a6ea5f48415854223285/tensorflow/core/kernels/sparse_reshape_op.cc#L40) has no validation that the input arguments specify a valid sparse tensor. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2 and TensorFlow 2.3.3, as these are the only affected versions.

Affected

Product or packageVersionsReported by
tensorflow tensorflow< 2.3.3, >= 2.4.0, < 2.4.2CVE List
tensorflow (PyPI)from 2.3.0 before 2.3.3, from 2.4.0 before 2.4.2, before 1d04d7d93f4ed3854abf75d6b712d72c3f70d6b6, before 2.1.4, from 2.2.0 before 2.2.3GitHub Advisory Database, PyPA Advisory Database
tensorflow-cpu (PyPI)from 2.3.0 before 2.3.3, from 2.4.0 before 2.4.2, before 1d04d7d93f4ed3854abf75d6b712d72c3f70d6b6, before 2.1.4, from 2.2.0 before 2.2.3GitHub Advisory Database, PyPA Advisory Database
tensorflow-gpu (PyPI)from 2.3.0 before 2.3.3, from 2.4.0 before 2.4.2, before 1d04d7d93f4ed3854abf75d6b712d72c3f70d6b6, before 2.1.4, from 2.2.0 before 2.2.3GitHub Advisory Database, PyPA Advisory Database
google tensorflowbefore 2.1.4, from 2.2.0 before 2.2.3, from 2.3.0 before 2.3.3, from 2.4.0 before 2.4.2NVD
tensorflow (Bitnami)before 2.1.4, from 2.2.0 before 2.2.3, from 2.3.0 before 2.3.3, from 2.4.0 before 2.4.2Bitnami Vulnerability Database

All scores

GitHub_M3.6low CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L
GitHub3.6low CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L
GitHublow CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD2.1low CVSS:2.0AV:L/AC:L/Au:N/C:N/I:N/A:P
Bitnami Vulnerability Databasemedium rating

Classification

What each source says

CVE List

TensorFlow is an end-to-end open source platform for machine learning. Incomplete validation in `SparseReshape` results in a denial of service based on a `CHECK`-failure. The implementation(https://github.com/tensorflow/tensorflow/blob/e87b51ce05c3eb172065a6ea5f48415854223285/tensorflow/core/kernels/sparse_reshape_op.cc#L40) has no validation that the input arguments specify a valid sparse tensor. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2 and TensorFlow 2.3.3, as these are the only affected versions.

GitHub Advisory Database
Impact

Incomplete validation in SparseReshape results in a denial of service based on a CHECK-failure.

import tensorflow as tf

input_indices = tf.constant(41, shape=[1, 1], dtype=tf.int64)
input_shape = tf.zeros([11], dtype=tf.int64)
new_shape = tf.zeros([1], dtype=tf.int64)

tf.raw_ops.SparseReshape(input_indices=input_indices,
    input_shape=input_shape,
    new_shape=new_shape)

The implementation has no validation that the input arguments specify a valid sparse tensor.

Patches

We have patched the issue in GitHub commit 1d04d7d93f4ed3854abf75d6b712d72c3f70d6b6.

The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2 and TensorFlow 2.3.3, as these are the only affected versions.

For more information

Please consult our security guide for more information regarding the security model and how to contact us with issues and questions.

Attribution

This vulnerability has been reported by Ying Wang and Yakun Zhang of Baidu X-Team.

NVD (es)

TensorFlow es una plataforma de código abierto de extremo a extremo para el aprendizaje automático.&#xa0;Una comprobación incompleta en "SparseReshape" resulta en una denegación de servicio basada en un fallo "CHECK".&#xa0;La implementación (https://github.com/tensorflow/tensorflow/blob/e87b51ce05c3eb172065a6ea5f48415854223285/tensorflow/core/kernels/sparse_reshape_op.cc#L40) no presenta comprobación de que los argumentos de entrada especifiquen un tensor disperso válido.&#xa0;La corrección será incluída en TensorFlow versión 2.5.0.&#xa0;También seleccionaremos este commit en TensorFlow 2.4.2 y TensorFlow 2.3.3, ya que estas son las únicas versiones afectadas

References

Sources

SourceRecordLicence
CVE ListCVE-2021-29611 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-9rpc-5v9q-5r7f changed 2026-07-08CC-BY-4.0
NVDCVE-2021-29611 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2021-248 changed 2023-12-06CC-BY-4.0
PyPA Advisory DatabasePYSEC-2021-539 changed 2023-12-06CC-BY-4.0
PyPA Advisory DatabasePYSEC-2021-737 changed 2023-12-06CC-BY-4.0
Bitnami Vulnerability DatabaseBIT-TENSORFLOW-2021-29611 changed 2026-09-08Apache-2.0