CVE-2022-29195
JSON

5.5medium

Missing validation causes denial of service in TensorFlow via `StagePeek`

Severity
5.5medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.33% (higher than 27% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-h48f-q7rw-hvr7BIT-TENSORFLOW-2022-29195PYSEC-2026-1003PYSEC-2026-3196PYSEC-2026-3335

Description

TensorFlow is an open source platform for machine learning. Prior to versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4, the implementation of `tf.raw_ops.StagePeek` does not fully validate the input arguments. This results in a `CHECK`-failure which can be used to trigger a denial of service attack. The code assumes `index` is a scalar but there is no validation for this before accessing its value. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.

Affected

Product or packageVersionsReported by
tensorflow tensorflow< 2.6.4, >= 2.7.0rc0, < 2.7.2, >= 2.8.0rc0, < 2.8.1, >= 2.9.0rc0, < 2.9.0CVE List
tensorflow (PyPI)before 2.6.4, from 2.7.0 before 2.7.2, from 2.8.0 before 2.8.1GitHub Advisory Database, PyPA Advisory Database
tensorflow-cpu (PyPI)before 2.6.4, from 2.7.0 before 2.7.2, from 2.8.0 before 2.8.1GitHub Advisory Database, PyPA Advisory Database
tensorflow-gpu (PyPI)before 2.6.4, from 2.7.0 before 2.7.2, from 2.8.0 before 2.8.1GitHub Advisory Database, PyPA Advisory Database
google tensorflowbefore 2.6.4, from 2.7.0 before 2.7.2, 2.7.0, 2.8.0, 2.9.0NVD
tensorflow (Bitnami)before 2.6.4, from 2.7.0 before 2.7.2Bitnami Vulnerability Database

All scores

GitHub_M5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
GitHub5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
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
PyPA Advisory Database5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Bitnami Vulnerability Databasemedium rating

Classification

CWE-20

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

TensorFlow is an open source platform for machine learning. Prior to versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4, the implementation of `tf.raw_ops.StagePeek` does not fully validate the input arguments. This results in a `CHECK`-failure which can be used to trigger a denial of service attack. The code assumes `index` is a scalar but there is no validation for this before accessing its value. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.

GitHub Advisory Database
Impact

The implementation of tf.raw_ops.StagePeek does not fully validate the input arguments. This results in a CHECK-failure which can be used to trigger a denial of service attack:

import tensorflow as tf

index = tf.constant([], shape=[0], dtype=tf.int32)
tf.raw_ops.StagePeek(index=index, dtypes=[tf.int32])

The code assumes index is a scalar but there is no validation for this before accessing its value:

std::size_t index = ctx->input(0).scalar<int>()();
Patches

We have patched the issue in GitHub commit cebe3c45d76357d201c65bdbbf0dbe6e8a63bbdb.

The fix will be included in TensorFlow 2.9.0. We will also cherrypick this commit on TensorFlow 2.8.1, TensorFlow 2.7.2, and TensorFlow 2.6.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 Neophytos Christou from Secure Systems Lab at Brown University.

NVD (es)

TensorFlow es una plataforma de código abierto para el aprendizaje automático. En versiones anteriores a 2.9.0, 2.8.1, 2.7.2 y 2.6.4, la implementación de "tf.raw_ops.StagePeek" no comprueba completamente los argumentos de entrada. Esto resulta en un fallo de "CHECK" que puede ser usado para desencadenar un ataque de denegación de servicio. El código asume que "index" es un escalar pero no es comprobado antes de acceder a su valor. Las versiones 2.9.0, 2.8.1, 2.7.2 y 2.6.4 contienen un parche para este problema

References

https://github.com/tensorflow/tensorflow/releases/tag/v2.6.4advisory, release-notes, third-party-advisory, web
https://github.com/tensorflow/tensorflow/releases/tag/v2.7.2advisory, release-notes, third-party-advisory, web
https://github.com/tensorflow/tensorflow/releases/tag/v2.8.1advisory, release-notes, third-party-advisory, web
https://github.com/tensorflow/tensorflow/releases/tag/v2.9.0advisory, release-notes, third-party-advisory, web
https://github.com/tensorflow/tensorflow/security/advisories/GHSA-h48f-q7rw-hvr7advisory, release-notes, third-party-advisory, web
https://github.com/tensorflow/tensorflow/commit/cebe3c45d76357d201c65bdbbf0dbe6e8a63bbdbadvisory, patch, third-party-advisory, web
https://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/core/kernels/stage_op.cc#L26advisory, exploit, third-party-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2022-29195advisory, web
https://github.com/tensorflow/tensorflowweb
https://pypi.org/project/tensorflow-gpupackage
https://github.com/advisories/GHSA-h48f-q7rw-hvr7advisory
https://pypi.org/project/tensorflowpackage

Sources

SourceRecordLicence
CVE ListCVE-2022-29195 changed 2025-04-22CVE Terms of Use
GitHub Advisory DatabaseGHSA-h48f-q7rw-hvr7 changed 2026-07-13CC-BY-4.0
NVDCVE-2022-29195 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-1003 changed 2026-07-13CC-BY-4.0
PyPA Advisory DatabasePYSEC-2026-3196 changed 2026-07-13CC-BY-4.0
PyPA Advisory DatabasePYSEC-2026-3335 changed 2026-07-13CC-BY-4.0
Bitnami Vulnerability DatabaseBIT-TENSORFLOW-2022-29195 changed 2026-09-08Apache-2.0