CVE-2022-29204
JSON

5.5medium

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

Severity
5.5medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.34% (higher than 20% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-hx9q-2mx4-m4pgBIT-TENSORFLOW-2022-29204PYSEC-2026-1010PYSEC-2026-3203PYSEC-2026-3342

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.UnsortedSegmentJoin` 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 `num_segments` is a positive scalar but there is no validation. Since this value is used to allocate the output tensor, a negative value would result in a `CHECK`-failure (assertion failure), as per 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 tensorflowfrom 1.15.0 before 2.6.4, from 2.7.0 before 2.7.2, 2.7.0, 2.8.0, 2.9.0NVD
tensorflow (Bitnami)from 1.15.0 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-20CWE-191

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.UnsortedSegmentJoin` 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 `num_segments` is a positive scalar but there is no validation. Since this value is used to allocate the output tensor, a negative value would result in a `CHECK`-failure (assertion failure), as per 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.UnsortedSegmentJoin 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

tf.strings.unsorted_segment_join(
  inputs=['123'],
  segment_ids=[0],
  num_segments=-1)

The code assumes num_segments is a positive scalar but there is no validation:

const Tensor& num_segments_tensor = context->input(2);
auto num_segments = num_segments_tensor.scalar<NUM_SEGMENTS_TYPE>()();
// ...
Tensor* output_tensor = nullptr;
TensorShape output_shape =
    GetOutputShape(input_shape, segment_id_shape, num_segments);

Since this value is used to allocate the output tensor, a negative value would result in a CHECK-failure (assertion failure), as per TFSA-2021-198.

Patches

We have patched the issue in GitHub commit 84563f265f28b3c36a15335c8b005d405260e943 and GitHub commit 20cb18724b0bf6c09071a3f53434c4eec53cc147.

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 externally via a GitHub issue.

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.UnsortedSegmentJoin" no comprobaba completamente los argumentos de entrada. Esto resulta en un fallo de "CHECK" que puede usarse para desencadenar un ataque de denegación de servicio. El código asume que "num_segments" es un escalar positivo, pero no lo comprueba. Dado que este valor es usado para asignar el tensor de salida, un valor negativo resulta en un fallo de "CHECK" (fallo de aserción), según 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-hx9q-2mx4-m4pgadvisory, exploit, patch, third-party-advisory, web
https://github.com/tensorflow/tensorflow/commit/20cb18724b0bf6c09071a3f53434c4eec53cc147advisory, patch, third-party-advisory, web
https://github.com/tensorflow/tensorflow/commit/84563f265f28b3c36a15335c8b005d405260e943advisory, patch, third-party-advisory, web
https://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/core/kernels/unsorted_segment_join_op.cc#L83-L14advisory, third-party-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2022-29204advisory, web
https://github.com/tensorflow/tensorflowpackage
https://pypi.org/project/tensorflow-gpupackage

Sources

SourceRecordLicence
CVE ListCVE-2022-29204 changed 2025-04-22CVE Terms of Use
GitHub Advisory DatabaseGHSA-hx9q-2mx4-m4pg changed 2026-07-13CC-BY-4.0
NVDCVE-2022-29204 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-1010 changed 2026-07-13CC-BY-4.0
PyPA Advisory DatabasePYSEC-2026-3203 changed 2026-07-13CC-BY-4.0
PyPA Advisory DatabasePYSEC-2026-3342 changed 2026-07-13CC-BY-4.0
Bitnami Vulnerability DatabaseBIT-TENSORFLOW-2022-29204 changed 2026-09-08Apache-2.0