Quick answers
- Is CVE-2022-21726 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2022-21726 being exploited in the wild.
- How severe is CVE-2022-21726?
- Low severity, with a CVSS score of 3.1, published 9 July 2026.
- Which products and versions are affected?
- Google TensorFlow < 2.5.3, 2.6.0-2.6.2, 2.7.0; tensorflow (PyPI) ECOSYSTEM:introduced=0,fixed=2.5.3,introduced=2.6.0,fixed=2.6.3,introduced=2.7.0,fixed=2.7.1; tensorflow-cpu (PyPI) GIT:introduced=0,fixed=23968a8bf65b009120c43b5ebcceaf52dbc9e943|ECOSYSTEM:introduced=0,fixed=2.5.3,introduced=2.6.0,fixed=2.6.3; tensorflow-gpu (PyPI) GIT:introduced=0,fixed=23968a8bf65b009120c43b5ebcceaf52dbc9e943|ECOSYSTEM:introduced=0,fixed=2.5.3,introduced=2.6.0,fixed=2.6.3.
- Is there a fix for CVE-2022-21726?
- Yes. tensorflow (PyPI): upgrade to 2.7.1 or later; tensorflow-cpu (PyPI): upgrade to 2.6.3 or later; tensorflow-gpu (PyPI): upgrade to 2.6.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2022-21726 attacked?
- It is attacked over the network.
- Am I affected by CVE-2022-21726?
- Check whether you run Google TensorFlow, tensorflow (PyPI), tensorflow-cpu (PyPI) or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- tensorflow (PyPI): upgrade to 2.7.1 or later
pip install "tensorflow>=2.7.1" - tensorflow-cpu (PyPI): upgrade to 2.6.3 or later
pip install "tensorflow-cpu>=2.6.3" - tensorflow-gpu (PyPI): upgrade to 2.6.3 or later
pip install "tensorflow-gpu>=2.6.3"
Technical details
The vulnerability is an out-of-bounds (OOB) heap read in TensorFlow's Dequantize kernel (CWE-125). The root cause is insufficient validation of the axis parameter—while the code checks that axis is greater than -1, it does not verify that axis does not exceed the number of input tensor dimensions. This allows an attacker to pass an arbitrarily large axis value (e.g., 2^31-1) that causes the code to read past the end of the dimension array when accessing input.dim_size(axis_). The attack requires the ability to call tf.raw_ops.Dequantize with a crafted input, which is feasible in environments where users can execute arbitrary TensorFlow code (network-accessible inference servers, collaborative notebooks). Patches are available in TensorFlow 2.8.0, 2.7.1, 2.6.3, and 2.5.3.
Affected products
- Google TensorFlow < 2.5.3, 2.6.0-2.6.2, 2.7.0
- Google TensorFlow CPU < 2.5.3, 2.6.0-2.6.2, 2.7.0
- Google TensorFlow GPU < 2.5.3, 2.6.0-2.6.2, 2.7.0
Identifiers
- CVE-2022-21726
- GHSA-23hm-7w47-xw72
- PYSEC-2022-105
- PYSEC-2022-50
- PYSEC-2026-3082
Timeline
- 2022-02-09: disclosed
- 2022-02: patched: Fixed in TensorFlow 2.8.0; backports to 2.7.1, 2.6.3, 2.5.3