CVE-2022-23584: Use After Free Vulnerability in TensorFlow
Summary
CVE-2022-23584: Tensorflow is an Open Source Machine Learning Framework. Affects tensorflow-cpu 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-gpu · 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 building and training machine learning models. It provides a comprehensive set of tools and libraries for developing and deploying machine learning applications. TensorFlow supports various image formats, including PNG, for processing and analysis. However, a vulnerability has been discovered in TensorFlow's PNG image decoding functionality.
Vulnerability Detail
The vulnerability (CVE-2022-23584) in TensorFlow's PNG image decoding functionality allows a malicious user to trigger a use after free behavior. When decoding PNG images, the function png::CommonFreeDecode(&decode) is called, which results in the values of decode.width and decode.height being left in an unspecified state. This can lead to unexpected behavior and potential exploitation by an attacker. The issue has been identified and fixed in TensorFlow 2.8.0, and the fix has also been backported to TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, which are still within the supported range.
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.32.5.3pip install --upgrade "tensorflow-cpu==2.5.3" -
>= 2.6.0, < 2.6.32.6.3pip 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 essential to update TensorFlow to the fixed versions mentioned above.
Conclusion
The use after free vulnerability in TensorFlow's PNG image decoding functionality (CVE-2022-23584) can be mitigated by updating to TensorFlow 2.8.0 or applying the respective patches for TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3. It is crucial to keep the TensorFlow version up to date to ensure the proper handling of PNG image decoding and prevent potential exploitation. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow-cpu →
FAQ
TensorFlow is an open-source machine learning framework used for building and training machine learning models.
The vulnerability allows a malicious user to trigger a use after free behavior, potentially leading to unexpected behavior and exploitation.
The vulnerability affects TensorFlow versions up to 2.5.3. TensorFlow 2.8.0 and the patched versions (2.7.1, 2.6.3, and 2.5.3) are not affected.
No, there is no known workaround for this vulnerability. Updating to the fixed versions is the recommended solution.
You can find more information about this vulnerability in the TensorFlow advisory database: [link to the advisory database]
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-cpu.