CVE-2020-26268: TensorFlow GPU - Memory Write Crash Vulnerability
Summary
CVE-2020-26268: In affected versions of TensorFlow the tf.raw_ops.ImmutableConst operation returns a constant tensor created from a memory mapped file which is assumed immutable. Affects tensorflow-gpu across 6 version ranges.
< 1.15.5
>= 2.0.0, < 2.0.4
>= 2.1.0, < 2.1.3
>= 2.2.0, < 2.2.2
>= 2.3.0, < 2.3.2
< c1e1fc899ad5f8c725dcbb6470069890b5060bc7
Fixed in 5 releases; the minimum fixed version depends on the release line you run. How to fix ↓
Also tracked for
- tensorflow · Bitnami
- tensorflow · PyPI
- tensorflow-cpu · PyPI
- tensorflow · PyPI
The same CVE-2020-26268 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 used for building and training various models. It provides a wide range of functionalities and is widely adopted in the AI community. The TensorFlow GPU package, available on PyPI, is specifically designed to leverage GPU capabilities for accelerated computations. However, a vulnerability has been discovered in certain versions of TensorFlow GPU that can lead to a memory write crash.
Vulnerability Detail
In affected versions of TensorFlow GPU, the tf.raw_ops.ImmutableConst operation attempts to create a constant tensor from a memory mapped file. However, if the tensor's type is not an integral type, the operation crashes the Python interpreter as it tries to write to the memory area. This vulnerability can be exploited by an attacker to cause a segmentation fault, leading to a denial of service (DoS) condition. The issue arises due to an allocator used to return the buffer data not being marked as returning an opaque handle.
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.
-
< 1.15.51.15.5pip install --upgrade "tensorflow-gpu==1.15.5" -
>= 2.0.0, < 2.0.42.0.4pip install --upgrade "tensorflow-gpu==2.0.4" -
>= 2.1.0, < 2.1.32.1.3pip install --upgrade "tensorflow-gpu==2.1.3" -
>= 2.2.0, < 2.2.22.2.2pip install --upgrade "tensorflow-gpu==2.2.2" -
>= 2.3.0, < 2.3.22.3.2pip install --upgrade "tensorflow-gpu==2.3.2"
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 workaround, users can avoid using the tf.raw_ops.ImmutableConst operation with non-integral tensor types. By ensuring that only integral types are used, the vulnerability can be mitigated. Here is an example of how to create a constant tensor using tf.constant instead:
import tensorflow as tf
# Create a constant tensor with an integral type
tensor = tf.constant([1, 2, 3], dtype=tf.int32)
Conclusion
The memory write crash vulnerability in TensorFlow GPU can be mitigated by updating to the fixed versions mentioned. Additionally, users can follow the provided workaround to avoid the vulnerable operation with non-integral tensor types. For further assistance or support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow-gpu →
FAQ
TensorFlow GPU is a package that enables TensorFlow to utilize the computational power of GPUs for accelerated machine learning tasks.
This vulnerability can lead to a memory write crash, causing a denial of service (DoS) condition. It can be exploited by an attacker to disrupt TensorFlow GPU-based applications.
The vulnerability affects versions of TensorFlow GPU prior to 1.15.5, 2.0.4, 2.1.3, 2.2.2, 2.3.2, and 2.4.0.
You can update TensorFlow GPU by using the package manager or manually installing the updated version. Refer to the TensorFlow documentation for detailed instructions.
Yes, you can mitigate the vulnerability by avoiding the use of non-integral tensor types with the tf.raw_ops.ImmutableConst operation. Use tf.constant with integral types instead.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.