CVE-2022-29203
JSON

5.5medium

Integer overflow in `SpaceToBatchND` in TensorFlow

Severity
5.5medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.33% (higher than 18% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-jjm6-4vf7-cjh4BIT-TENSORFLOW-2022-29203PYSEC-2026-1012PYSEC-2026-3207PYSEC-2026-3344

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.SpaceToBatchND` (in all backends such as XLA and handwritten kernels) is vulnerable to an integer overflow: The result of this integer overflow is used to allocate the output tensor, hence we get a denial of service via a `CHECK`-failure (assertion failure), as in TFSA-2021-198. 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.2, from 2.8.0 before 2.8.1Bitnami 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-190

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.SpaceToBatchND` (in all backends such as XLA and handwritten kernels) is vulnerable to an integer overflow: The result of this integer overflow is used to allocate the output tensor, hence we get a denial of service via a `CHECK`-failure (assertion failure), as in TFSA-2021-198. 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.SpaceToBatchND (in all backends such as XLA and handwritten kernels) is vulnerable to an integer overflow:

import tensorflow as tf

input = tf.constant(-3.5e+35, shape=[10,19,22], dtype=tf.float32)
block_shape = tf.constant(-1879048192, shape=[2], dtype=tf.int64)
paddings = tf.constant(0, shape=[2,2], dtype=tf.int32)
tf.raw_ops.SpaceToBatchND(input=input, block_shape=block_shape, paddings=paddings)

The result of this integer overflow is used to allocate the output tensor, hence we get a denial of service via a CHECK-failure (assertion failure), as in TFSA-2021-198.

Patches

We have patched the issue in GitHub commit acd56b8bcb72b163c834ae4f18469047b001fadf.

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.SpaceToBatchND" (en todos los backends como XLA y kernels manuscritos) es vulnerable a un desbordamiento de enteros: El resultado de este desbordamiento de enteros es usado para asignar el tensor de salida, por lo que es obtenido una denegación de servicio por medio de un fallo de "CHECK" (fallo de aserción), como en TFSA-2021-198. 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/blob/master/tensorflow/security/advisory/tfsa-2021-198.mdadvisory, patch, third-party-advisory, web
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-jjm6-4vf7-cjh4advisory, exploit, patch, third-party-advisory, web
https://github.com/tensorflow/tensorflow/commit/acd56b8bcb72b163c834ae4f18469047b001fadfadvisory, patch, third-party-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2022-29203advisory, web
https://github.com/tensorflow/tensorflowpackage
https://pypi.org/project/tensorflow-gpupackage
https://github.com/advisories/GHSA-jjm6-4vf7-cjh4advisory
https://pypi.org/project/tensorflowpackage

Sources

SourceRecordLicence
CVE ListCVE-2022-29203 changed 2025-04-22CVE Terms of Use
GitHub Advisory DatabaseGHSA-jjm6-4vf7-cjh4 changed 2026-07-13CC-BY-4.0
NVDCVE-2022-29203 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-1012 changed 2026-07-13CC-BY-4.0
PyPA Advisory DatabasePYSEC-2026-3207 changed 2026-07-13CC-BY-4.0
PyPA Advisory DatabasePYSEC-2026-3344 changed 2026-07-13CC-BY-4.0
Bitnami Vulnerability DatabaseBIT-TENSORFLOW-2022-29203 changed 2026-09-08Apache-2.0