7.3high
Heap OOB in boosted trees in TensorFlow
- Severity
- 7.3high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.17% (higher than 3% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-r4c4-5fpq-56wgBIT-TENSORFLOW-2021-37664PYSEC-2021-286PYSEC-2021-577PYSEC-2021-775
Description
TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can read from outside of bounds of heap allocated data by sending specially crafted illegal arguments to `BoostedTreesSparseCalculateBestFeatureSplit`. The [implementation](https://github.com/tensorflow/tensorflow/blob/84d053187cb80d975ef2b9684d4b61981bca0c41/tensorflow/core/kernels/boosted_trees/stats_ops.cc) needs to validate that each value in `stats_summary_indices` is in range. We have patched the issue in GitHub commit e84c975313e8e8e38bb2ea118196369c45c51378. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| tensorflow tensorflow | >= 2.5.0, < 2.5.1, >= 2.4.0, < 2.4.3, < 2.3.4 | CVE List |
| tensorflow (PyPI) | before 2.3.4, from 2.4.0 before 2.4.3, from 2.5.0 before 2.5.1, before e84c975313e8e8e38bb2ea118196369c45c51378, from 2.3.0 before 2.3.4 | GitHub Advisory Database, PyPA Advisory Database |
| tensorflow-cpu (PyPI) | before 2.3.4, from 2.4.0 before 2.4.3, from 2.5.0 before 2.5.1, before e84c975313e8e8e38bb2ea118196369c45c51378, from 2.3.0 before 2.3.4 | GitHub Advisory Database, PyPA Advisory Database |
| tensorflow-gpu (PyPI) | before 2.3.4, from 2.4.0 before 2.4.3, from 2.5.0 before 2.5.1, before e84c975313e8e8e38bb2ea118196369c45c51378, from 2.3.0 before 2.3.4 | GitHub Advisory Database, PyPA Advisory Database |
| google tensorflow | from 2.3.0 before 2.3.4, from 2.4.0 before 2.4.3, 2.5.0, 2.6.0 | NVD |
| tensorflow (Bitnami) | from 2.3.0 before 2.3.4, from 2.4.0 before 2.4.3, from 2.5.0 before 2.5.1 | Bitnami Vulnerability Database |
All scores
| GitHub_M | 7.3high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H |
| GitHub | 7.3high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:H/SC:N/SI:N/SA:N |
| NVD | 7.1high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H |
| NVD | 3.6low CVSS:2.0 | AV:L/AC:L/Au:N/C:P/I:N/A:P |
| Bitnami Vulnerability Database | high rating |
Classification
What each source says
CVE List
TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can read from outside of bounds of heap allocated data by sending specially crafted illegal arguments to `BoostedTreesSparseCalculateBestFeatureSplit`. The [implementation](https://github.com/tensorflow/tensorflow/blob/84d053187cb80d975ef2b9684d4b61981bca0c41/tensorflow/core/kernels/boosted_trees/stats_ops.cc) needs to validate that each value in `stats_summary_indices` is in range. We have patched the issue in GitHub commit e84c975313e8e8e38bb2ea118196369c45c51378. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.
GitHub Advisory Database
Impact
An attacker can read from outside of bounds of heap allocated data by sending specially crafted illegal arguments to BoostedTreesSparseCalculateBestFeatureSplit:
import tensorflow as tf
tf.raw_ops.BoostedTreesSparseCalculateBestFeatureSplit(
node_id_range=[0,10],
stats_summary_indices=[[1, 2, 3, 0x1000000]],
stats_summary_values=[1.0],
stats_summary_shape=[1,1,1,1],
l1=l2=[1.0],
tree_complexity=[0.5],
min_node_weight=[1.0],
logits_dimension=3,
split_type='inequality')
The implementation needs to validate that each value in stats_summary_indices is in range.
Patches
We have patched the issue in GitHub commit e84c975313e8e8e38bb2ea118196369c45c51378.
The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.
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 members of the Aivul Team from Qihoo 360.
NVD (es)
TensorFlow es una plataforma de código abierto de extremo a extremo para el aprendizaje automático. En las versiones afectadas, un atacante puede leer fuera de límites de los datos asignados a la pila mediante el envío de argumentos ilegales especialmente diseñados a "BoostedTreesSparseCalculateBestFeatureSplit". La [implementación](https://github.com/tensorflow/tensorflow/blob/84d053187cb80d975ef2b9684d4b61981bca0c41/tensorflow/core/kernels/boosted_trees/stats_ops.cc) necesita comprender que cada valor en "stats_summary_indices" está en el rango. Hemos parcheado el problema en el commit e84c975313e8e8e38bb2ea118196369c45c51378 de GitHub. La corrección será incluida en TensorFlow versión 2.6.0. También seleccionaremos este commit en TensorFlow versión 2.5.1, TensorFlow versión 2.4.3, y TensorFlow versión 2.3.4, ya que estos también están afectados y todavía están en el rango de soporte.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-37664 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-r4c4-5fpq-56wg changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-37664 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2021-286 changed 2023-12-06 | CC-BY-4.0 |
| PyPA Advisory Database | PYSEC-2021-577 changed 2023-12-06 | CC-BY-4.0 |
| PyPA Advisory Database | PYSEC-2021-775 changed 2023-12-06 | CC-BY-4.0 |
| Bitnami Vulnerability Database | BIT-TENSORFLOW-2021-37664 changed 2026-09-08 | Apache-2.0 |