CVE-2022-21730: TensorFlow GPU FractionalAvgPoolGrad Heap Read Overflow

tensorflow-gpu 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-gpu 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

TensorFlow is an open-source machine learning framework widely used for developing and deploying machine learning models. It provides a comprehensive ecosystem for building and training neural networks. TensorFlow GPU is a variant of TensorFlow that leverages the power of GPUs for accelerated computation. It allows users to train and run machine learning models efficiently on GPU hardware.

Vulnerability Detail

The vulnerability (CVE-2022-21730) exists in the implementation of FractionalAvgPoolGrad in TensorFlow GPU. This vulnerability arises due to the lack of proper input validation, allowing an attacker to read data from outside the bounds of the heap. By exploiting this vulnerability, an attacker could potentially access sensitive information or execute arbitrary code, leading to a breach of confidentiality, integrity, or availability of the system. The vulnerability affects versions of TensorFlow GPU up to and including 2.5.3, 2.6.3, and 2.7.1.

How To Fix

Latest published version: 2.12.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-gpu==2.12.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-gpu==2.5.3"
  • >= 2.6.0, < 2.6.3 2.6.3
    pip install --upgrade "tensorflow-gpu==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

As a temporary workaround, users can consider avoiding the usage of FractionalAvgPoolGrad or any functionality that relies on it until the fix is applied. This can be achieved by modifying the code to use alternative pooling methods or by skipping the affected operations altogether. Here's an example of how to replace FractionalAvgPoolGrad with MaxPoolGrad:

import tensorflow as tf

# Replace FractionalAvgPoolGrad with MaxPoolGrad
output = tf.nn.max_pool_grad(input, ksize=ksize, strides=strides, padding=padding)

Please note that this workaround may impact the performance or accuracy of the machine learning model, so it should be used with caution.

Conclusion

The vulnerability (CVE-2022-21730) in TensorFlow GPU's FractionalAvgPoolGrad function poses a risk to the security and integrity of machine learning systems utilizing TensorFlow GPU. It is crucial to promptly apply the recommended fixes by upgrading to TensorFlow GPU 2.8.0 or applying the relevant patches for the affected versions. For further assistance or support in addressing this vulnerability, please reach out to DevNack.com.

See every vulnerability recorded for tensorflow-gpu →

Share this vulnerability

FAQ

TensorFlow GPU is a variant of TensorFlow that utilizes the power of GPUs for accelerated computation. It allows users to train and run machine learning models efficiently on GPU hardware, resulting in faster training and inference times.

The vulnerability in FractionalAvgPoolGrad allows an attacker to read data from outside the bounds of the heap. This can potentially lead to unauthorized access to sensitive information or the execution of arbitrary code, compromising the security and integrity of the TensorFlow GPU system.

The vulnerability affects TensorFlow GPU versions up to and including 2.5.3, 2.6.3, and 2.7.1. It is recommended to upgrade to TensorFlow GPU 2.8.0 or apply the relevant patch for the affected versions.

To fix the vulnerability, you should upgrade to TensorFlow GPU 2.8.0 or apply the relevant patch for the affected versions (2.7.1, 2.6.3, and 2.5.3). The TensorFlow development team has released the necessary fixes to address this vulnerability.

As a temporary workaround, you can avoid using FractionalAvgPoolGrad or any functionality that relies on it. Instead, consider using alternative pooling methods or skipping the affected operations until the fix is applied. However, please note that this workaround may impact the performance or accuracy of your machine learning models.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow-gpu.

How To Fix

Latest published version: 2.12.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-gpu==2.12.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-gpu==2.5.3"
  • >= 2.6.0, < 2.6.3 2.6.3
    pip install --upgrade "tensorflow-gpu==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