CVE-2021-37648: TensorFlow-GPU Null Pointer Dereference Vulnerability
Summary
CVE-2021-37648: TensorFlow is an end-to-end open source platform for machine learning. Affects tensorflow-gpu across 3 version ranges.
>= 2.3.0, < 2.3.4
>= 2.4.0, < 2.4.3
< 9728c60e136912a12d99ca56e106b7cce7af5986
Fixed in 2.3.4 or 2.4.3, depending on the release line you run. How to fix ↓
Also tracked for
- tensorflow · Bitnami
- tensorflow · PyPI
- tensorflow · PyPI
- tensorflow-cpu · PyPI
The same CVE-2021-37648 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 end-to-end open source platform for machine learning. It provides a comprehensive ecosystem of tools, libraries, and resources for developing and deploying machine learning models. TensorFlow-GPU is a variant of TensorFlow that leverages GPU acceleration for faster training and inference. It is widely used in various industries and research domains for deep learning tasks. However, a vulnerability has been discovered in TensorFlow-GPU that can lead to a null pointer dereference.
Vulnerability Detail
The vulnerability exists in the code for tf.raw_ops.SaveV2 in TensorFlow-GPU. The implementation of this code does not properly validate the inputs, allowing an attacker to trigger a null pointer dereference. The validation mechanism used in the code fails to catch the illegal state represented by the attacker's input. As a result, the kernel execution continues despite the validation error, leading to a null pointer dereference. This vulnerability can be exploited by an attacker to cause a denial of service (DoS) condition or potentially execute arbitrary code.
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.3.0, < 2.3.42.3.4pip install --upgrade "tensorflow-gpu==2.3.4" -
>= 2.4.0, < 2.4.32.4.3pip install --upgrade "tensorflow-gpu==2.4.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 following best practices for secure software development and deployment. This includes keeping all software components up to date, implementing proper input validation and sanitization, and applying security patches as soon as they become available.
Conclusion
The TensorFlow-GPU null pointer dereference vulnerability can be exploited by attackers to cause a denial of service or potentially execute arbitrary code. It is crucial for users of TensorFlow-GPU to update to the latest version once the fix is released to mitigate the risk. Regularly updating software and following secure development practices are essential for maintaining a secure machine learning environment. 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 training and inference of machine learning models.
A null pointer dereference occurs when a program attempts to access or manipulate memory using a null pointer, resulting in a crash or undefined behavior.
The vulnerability can be exploited by an attacker who can provide malicious input to the tf.raw_ops.SaveV2 function, triggering a null pointer dereference and potentially causing a denial of service or arbitrary code execution.
Yes, the vulnerability has been patched in the TensorFlow GitHub repository commit 9728c60e136912a12d99ca56e106b7cce7af5986. The fix will be included in TensorFlow 2.6.0.
To protect your system, it is recommended to update TensorFlow-GPU to the latest version once the fix is released. Additionally, follow best practices for secure software development and deployment, such as keeping all software components up to date and applying security patches promptly.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.