CVE-2022-23594: Out of Bounds Read in TensorFlow
Summary
CVE-2022-23594: Out of bounds read in Tensorflow. Affects tensorflow versions >= 2.7.0, < 2.7.1. Fixed in 2.7.1. How to fix ↓
Also tracked for
- tensorflow-cpu · PyPI
- tensorflow-gpu · PyPI
- tensorflow · Bitnami
The same CVE-2022-23594 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 training various deep learning models. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning applications. TensorFlow supports multiple programming languages, including Python, C++, and JavaScript, and offers GPU acceleration for faster computation. However, a vulnerability has been discovered in TensorFlow that can lead to out-of-bounds reads and writes in certain scenarios.
Vulnerability Detail
The vulnerability (CVE-2022-23594) exists in the TFG dialect of TensorFlow, specifically in the conversion process of the GraphDef to the MLIR-based dialect. The TFG dialect makes assumptions about the incoming GraphDef, and if an attacker modifies the SavedModel format on disk to invalidate these assumptions, it can cause a crash in the Python interpreter. This can potentially result in heap out-of-bounds reads and writes, leading to memory corruption and potential code execution. The issue was discovered through fuzzing, and it is possible that additional weaknesses exist.
How To Fix
Latest published version: 2.21.0 as of 22 Oct 2026
pip install --upgrade "tensorflow==2.21.0"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
2.7.1
This is the first release that contains the fix.
pip install --upgrade "tensorflow==2.7.1"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no specific workaround provided for this vulnerability. However, users can minimize the risk by ensuring that the SavedModel format on disk is not tampered with by unauthorized individuals. It is also recommended to follow best practices for securing TensorFlow deployments, such as restricting access to the SavedModel files and regularly updating to the latest TensorFlow version.
Conclusion
The vulnerability in TensorFlow (CVE-2022-23594) can lead to crashes and potential memory corruption in certain scenarios. It is crucial to update to the latest version of TensorFlow (2.8.0 or 2.7.1) to mitigate the risk. Additionally, users should follow best practices for securing TensorFlow deployments and ensure the integrity of the SavedModel format on disk. For further assistance and support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
TensorFlow is an open-source machine learning framework used for developing and training deep learning models.
The vulnerability can lead to crashes in the Python interpreter and potential heap out-of-bounds reads and writes, which may result in memory corruption and code execution.
The vulnerability was discovered through fuzzing, a technique that involves providing unexpected inputs to a program to uncover potential weaknesses.
Yes, the TensorFlow development team has released patches in TensorFlow 2.8.0 and TensorFlow 2.7.1. It is recommended to update to the latest version to mitigate the risk.
While there is no specific workaround provided, users can minimize the risk by ensuring the integrity of the SavedModel format on disk and following best practices for securing TensorFlow deployments.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.