CVE-2022-23584: Use After Free Vulnerability in TensorFlow-GPU
Summary
CVE-2022-23584: Tensorflow is an Open Source Machine Learning Framework. Affects tensorflow-gpu across 3 version ranges.
< 2.5.3
>= 2.6.0, < 2.6.3
< e746adbfcfee15e9cfdb391ff746c765b99bdf9b
Fixed in 2.5.3 or 2.6.3, depending on the release line you run. How to fix ↓
Also tracked for
- tensorflow · PyPI
- tensorflow · Bitnami
- tensorflow · PyPI
- tensorflow-cpu · PyPI
The same CVE-2022-23584 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
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.
No signup required · Results in about 60 seconds
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-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 on GPU devices, enabling faster and more efficient processing of large datasets. However, a vulnerability has been discovered in TensorFlow-GPU that can lead to a use after free behavior when decoding PNG images.
Vulnerability Detail
The use after free vulnerability in TensorFlow-GPU arises when decoding PNG images. After the png::CommonFreeDecode(&decode) function is called, the values of decode.width and decode.height are left in an unspecified state. This can result in unexpected behavior and potentially lead to security issues. An attacker with malicious intent could exploit this vulnerability to execute arbitrary code or cause a denial of service (DoS) attack. The vulnerability has been assigned the CVE identifier CVE-2022-23584.
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.32.5.3pip install --upgrade "tensorflow-gpu==2.5.3" -
>= 2.6.0, < 2.6.32.6.3pip 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 avoid the use of PNG images in their TensorFlow-GPU applications until the fix is applied. This can be achieved by converting PNG images to alternative formats, such as JPEG or BMP, before using them in TensorFlow-GPU. However, it is recommended to apply the official fix as soon as possible to ensure the security and stability of the application.
Conclusion
The use after free vulnerability in TensorFlow-GPU when decoding PNG images can pose a significant security risk to applications utilizing this framework. It is crucial for users to update their TensorFlow-GPU installations to the fixed versions as soon as possible to mitigate the risk of exploitation. Additionally, applying the temporary workaround of avoiding the use of PNG images can provide some level of protection until the fix is applied. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow-gpu →
FAQ
TensorFlow-GPU is a variant of TensorFlow that utilizes GPU devices for accelerated machine learning computations. It allows users to train and run machine learning models faster and more efficiently.
A use after free vulnerability occurs when a program continues to use a memory address after it has been freed. This can lead to unexpected behavior and potentially be exploited by attackers to execute arbitrary code or cause a denial of service.
An attacker could craft a malicious PNG image and supply it to a TensorFlow-GPU application. When the application attempts to decode the image, the use after free vulnerability can be triggered, potentially allowing the attacker to execute arbitrary code or disrupt the application's functionality.
No, not all versions of TensorFlow-GPU are affected. The vulnerability exists in TensorFlow-GPU versions 2.5.3, 2.6.3, and 2.7.1. Users of these versions should update to the fixed versions as soon as possible.
Yes, a fix for this vulnerability will be included in TensorFlow 2.8.0. Additionally, the fix will be backported to TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3 to ensure compatibility and support for affected users.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.