Skip to content
OpenAdvisories
High · 7.6 CVE-2022-21727 BIT-tensorflow-2022-21727EUVD-2022-0290GHSA-c6fh-56w7-fvjwPYSEC-2022-106PYSEC-2022-51PYSEC-2026-3159

Integer overflow in Tensorflow

Published Feb 3, 2022 · Updated May 5, 2025 · Assigned by GitHub_M

Description

Tensorflow is an Open Source Machine Learning Framework. The implementation of shape inference for `Dequantize` is vulnerable to an integer overflow weakness. The `axis` argument can be `-1` (the default value for the optional argument) or any other positive value at most the number of dimensions of the input. Unfortunately, the upper bound is not checked, and, since the code computes `axis + 1`, an attacker can trigger an integer overflow. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI tensorflow < 2.5.3 2.5.3 GHSA-c6fh-56w7-fvjw
PyPI tensorflow >= 2.6.0, < 2.6.3 2.6.3 GHSA-c6fh-56w7-fvjw
PyPI tensorflow >= 2.7.0, < 2.7.1 2.7.1 GHSA-c6fh-56w7-fvjw
PyPI tensorflow < 2.5.3 · >= 2.6.0, < 2.6.3 · >= 2.7.0, < 2.7.1 2.5.3, 2.6.3, 2.7.1 PYSEC-2026-3159
PyPI tensorflow-cpu < 2.5.3 2.5.3 GHSA-c6fh-56w7-fvjw
PyPI tensorflow-cpu >= 2.6.0, < 2.6.3 2.6.3 GHSA-c6fh-56w7-fvjw
PyPI tensorflow-cpu >= 2.7.0, < 2.7.1 2.7.1 GHSA-c6fh-56w7-fvjw
PyPI tensorflow-cpu < 2.5.3 · >= 2.6.0, < 2.6.3 2.5.3, 2.6.3 PYSEC-2022-51
PyPI tensorflow-gpu < 2.5.3 2.5.3 GHSA-c6fh-56w7-fvjw
PyPI tensorflow-gpu >= 2.6.0, < 2.6.3 2.6.3 GHSA-c6fh-56w7-fvjw
PyPI tensorflow-gpu >= 2.7.0, < 2.7.1 2.7.1 GHSA-c6fh-56w7-fvjw
PyPI tensorflow-gpu < 2.5.3 · >= 2.6.0, < 2.6.3 2.5.3, 2.6.3 PYSEC-2022-106

References