CVE-2022-21730: TensorFlow FractionalAvgPoolGrad Heap Read Out-of-Bounds

tensorflow-cpu Updated 02 Oct 2025

Summary

03/02/2022
Yes i
Unrated
Not published

CVE-2022-21730: Tensorflow is an Open Source Machine Learning Framework. Affects tensorflow-cpu across 3 version ranges.

< 2.5.3 >= 2.6.0, < 2.6.3 < 002408c3696b173863228223d535f9de72a101a9

Fixed in 2.5.3 or 2.6.3, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2022-21730 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

TensorFlow is an open-source machine learning framework widely used for developing and deploying machine learning models. It provides a comprehensive set of tools and libraries for building and training neural networks. TensorFlow is available on PyPI as the 'tensorflow-cpu' package.

Vulnerability Detail

The vulnerability (CVE-2022-21730) exists in the implementation of the 'FractionalAvgPoolGrad' function in TensorFlow. This function fails to handle cases where the input tensors are invalid, allowing an attacker to read data from outside the bounds of the heap. This can lead to information disclosure or potential exploitation of other vulnerabilities. The vulnerability affects versions of TensorFlow up to 2.5.3, 2.6.3, and 2.7.1.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-cpu==2.21.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 2.5.3 2.5.3
    pip install --upgrade "tensorflow-cpu==2.5.3"
  • >= 2.6.0, < 2.6.3 2.6.3
    pip install --upgrade "tensorflow-cpu==2.6.3"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

There is no known workaround for this vulnerability. It is recommended to apply the fix by upgrading to the patched versions of TensorFlow as soon as they are available.

Conclusion

The vulnerability in TensorFlow's FractionalAvgPoolGrad function can allow an attacker to read data from outside the bounds of the heap. It is crucial to upgrade to the patched versions (2.8.0, 2.7.1, 2.6.3, or 2.5.3) as soon as they are available to mitigate the risk. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for tensorflow-cpu →

Share this vulnerability

FAQ

TensorFlow is an open-source machine learning framework used for building and training neural networks.

This vulnerability allows an attacker to read data from outside the bounds of the heap, potentially leading to information disclosure or exploitation of other vulnerabilities.

Versions up to 2.5.3, 2.6.3, and 2.7.1 are affected by this vulnerability.

To fix the vulnerability, upgrade to TensorFlow 2.8.0 or the backported versions (2.7.1, 2.6.3, or 2.5.3) once they are available.

No, there is no known workaround for this vulnerability. It is recommended to apply the fix by upgrading to the patched versions of TensorFlow.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow-cpu.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-cpu==2.21.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 2.5.3 2.5.3
    pip install --upgrade "tensorflow-cpu==2.5.3"
  • >= 2.6.0, < 2.6.3 2.6.3
    pip install --upgrade "tensorflow-cpu==2.6.3"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback