CVE-2022-23570: TensorFlow GPU - Null Dereference Vulnerability
Summary
CVE-2022-23570: Tensorflow is an Open Source Machine Learning Framework. Affects tensorflow-gpu across 3 version ranges.
< 2.5.3
>= 2.6.0, < 2.6.3
< 8a513cec4bec15961fbfdedcaa5376522980455c
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-23570 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 ecosystem for building and training neural networks. TensorFlow GPU is a variant of TensorFlow that leverages GPU acceleration for faster computation. It is commonly used in scenarios where large-scale data processing and complex model training are required.
Vulnerability Detail
The vulnerability (CVE-2022-23570) in TensorFlow GPU arises when decoding a tensor from protobuf. If attributes of certain mutable arguments to some operations are missing from the proto, TensorFlow may encounter a null-dereference issue. This vulnerability is guarded by a DCHECK statement, which is a no-op in production builds but triggers an assertion failure in debug builds. In production builds, the execution proceeds to dereference the null pointer, potentially leading to unexpected behavior or crashes. In debug builds, the assertion failure causes a crash. The impact of this vulnerability can range from data corruption to denial of service.
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
There is no specific workaround provided for this vulnerability. However, users can mitigate the risk by ensuring that all required attributes are present in the proto when decoding tensors. This can be achieved by carefully constructing the protobuf message and verifying the completeness of the attributes before passing it to TensorFlow GPU.
Conclusion
The null-dereference vulnerability in TensorFlow GPU (CVE-2022-23570) can lead to unexpected behavior or crashes when decoding tensors from protobuf. It is crucial for users to update their TensorFlow GPU installations to the fixed versions once they become available. Regularly checking for updates and promptly applying them is recommended to ensure the security and stability of TensorFlow GPU deployments. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow-gpu →
FAQ
TensorFlow GPU is a variant of TensorFlow that utilizes GPU acceleration for faster computation. It is commonly used in scenarios where large-scale data processing and complex model training are required.
A null-dereference vulnerability occurs when a program attempts to access or manipulate memory using a null pointer, resulting in unexpected behavior or crashes.
DCHECK is a macro commonly used in C++ codebases for debugging purposes. It performs a runtime check and triggers an assertion failure if the condition is not met.
To check the version of TensorFlow GPU installed, you can run the following command: pip show tensorflow-gpu
The fix for this vulnerability will be included in TensorFlow 2.8.0. Additionally, it will be backported to TensorFlow 2.7.1 and TensorFlow 2.6.3.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.