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 package | Versions | Reported by |
|---|---|---|
| tensorflow tensorflow | < 2.3.3, >= 2.4.0, < 2.4.2 | CVE 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.3 | GitHub 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.3 | GitHub 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.3 | GitHub Advisory Database, PyPA Advisory Database |
| google tensorflow | 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.2 | NVD |
| 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.2 | Bitnami Vulnerability Database |
All scores
| GitHub_M | 3.6low CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L |
| GitHub | 3.6low CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L |
| GitHub | low CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N |
| NVD | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | 2.1low CVSS:2.0 | AV:L/AC:L/Au:N/C:N/I:N/A:P |
| Bitnami Vulnerability Database | medium 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. Una comprobación incompleta en "SparseReshape" resulta en una denegación de servicio basada en un fallo "CHECK". 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. La corrección será incluída en TensorFlow versión 2.5.0. 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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-29611 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-9rpc-5v9q-5r7f changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-29611 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2021-248 changed 2023-12-06 | CC-BY-4.0 |
| PyPA Advisory Database | PYSEC-2021-539 changed 2023-12-06 | CC-BY-4.0 |
| PyPA Advisory Database | PYSEC-2021-737 changed 2023-12-06 | CC-BY-4.0 |
| Bitnami Vulnerability Database | BIT-TENSORFLOW-2021-29611 changed 2026-09-08 | Apache-2.0 |