Skip to content
OpenAdvisories
Medium · 5.5 CVE-2022-29211 BIT-tensorflow-2022-29211EUVD-2022-5854GHSA-xrp2-fhq4-4q3wPYSEC-2026-1048PYSEC-2026-3260PYSEC-2026-3382

Segfault in TensorFlow if `tf.histogram_fixed_width` is called with NaN values

Published May 20, 2022 · Updated Apr 22, 2025 · Assigned by GitHub_M

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.histogram_fixed_width` is vulnerable to a crash when the values array contain `Not a Number` (`NaN`) elements. The implementation assumes that all floating point operations are defined and then converts a floating point result to an integer index. If `values` contains `NaN` then the result of the division is still `NaN` and the cast to `int32` would result in a crash. This only occurs on the CPU implementation. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.

Affected products

VendorProductAffectedFixed
tensorflow tensorflow < 2.6.4, >= 2.7.0rc0, < 2.7.2, >= 2.8.0rc0, < 2.8.1, >= 2.9.0rc0, < 2.9.0 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI tensorflow < 2.6.4 2.6.4 GHSA-xrp2-fhq4-4q3w
PyPI tensorflow >= 2.7.0, < 2.7.2 2.7.2 GHSA-xrp2-fhq4-4q3w
PyPI tensorflow >= 2.8.0, < 2.8.1 2.8.1 GHSA-xrp2-fhq4-4q3w
PyPI tensorflow < 2.6.4 · >= 2.7.0, < 2.7.2 · >= 2.8.0, < 2.8.1 2.6.4, 2.7.2, 2.8.1 PYSEC-2026-3260
PyPI tensorflow-cpu < 2.6.4 2.6.4 GHSA-xrp2-fhq4-4q3w
PyPI tensorflow-cpu >= 2.7.0, < 2.7.2 2.7.2 GHSA-xrp2-fhq4-4q3w
PyPI tensorflow-cpu >= 2.8.0, < 2.8.1 2.8.1 GHSA-xrp2-fhq4-4q3w
PyPI tensorflow-cpu < 2.6.4 · >= 2.7.0, < 2.7.2 · >= 2.8.0, < 2.8.1 2.6.4, 2.7.2, 2.8.1 PYSEC-2026-3382
PyPI tensorflow-gpu < 2.6.4 2.6.4 GHSA-xrp2-fhq4-4q3w
PyPI tensorflow-gpu >= 2.7.0, < 2.7.2 2.7.2 GHSA-xrp2-fhq4-4q3w
PyPI tensorflow-gpu >= 2.8.0, < 2.8.1 2.8.1 GHSA-xrp2-fhq4-4q3w
PyPI tensorflow-gpu < 2.6.4 · >= 2.7.0, < 2.7.2 · >= 2.8.0, < 2.8.1 2.6.4, 2.7.2, 2.8.1 PYSEC-2026-1048

References