CVE-2020-26270: TensorFlow-CPU LSTM/GRU Model Zero-Length Input Denial of Service Vulnerability
Summary
CVE-2020-26270: In affected versions of TensorFlow running an LSTM/GRU model where the LSTM/GRU layer receives an input with zero-length results in a CHECK failure when using the CUDA backend. Affects tensorflow-cpu 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
< 14755416e364f17fb1870882fa778c7fec7f16e3
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-gpu · PyPI
- tensorflow · PyPI
The same CVE-2020-26270 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 neural networks. It provides a comprehensive ecosystem of tools, libraries, and resources for developing and deploying machine learning models. The TensorFlow-CPU package is a variant of TensorFlow optimized for CPUs. It allows users to leverage the power of TensorFlow on systems without GPU support.
Vulnerability Detail
In affected versions of TensorFlow-CPU, when running an LSTM/GRU model and providing the LSTM/GRU layer with an input of zero-length, a CHECK failure occurs when using the CUDA backend. This vulnerability can be exploited by an attacker who can control the input to the layer, resulting in a denial of service (DoS) condition. The vulnerability is fixed in versions 1.15.5, 2.0.4, 2.1.3, 2.2.2, 2.3.2, and 2.4.0 of TensorFlow-CPU.
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.
-
< 1.15.51.15.5pip install --upgrade "tensorflow-cpu==1.15.5" -
>= 2.0.0, < 2.0.42.0.4pip install --upgrade "tensorflow-cpu==2.0.4" -
>= 2.1.0, < 2.1.32.1.3pip install --upgrade "tensorflow-cpu==2.1.3" -
>= 2.2.0, < 2.2.22.2.2pip install --upgrade "tensorflow-cpu==2.2.2" -
>= 2.3.0, < 2.3.22.3.2pip install --upgrade "tensorflow-cpu==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
There is no known workaround for this vulnerability. It is essential to update TensorFlow-CPU to one of the fixed versions to mitigate the risk of exploitation.
Conclusion
The vulnerability in TensorFlow-CPU, which allows for a denial of service attack through zero-length input in LSTM/GRU models, can be mitigated by updating to one of the fixed versions. It is crucial to promptly update the package to ensure the security and stability of machine learning applications. For further support and assistance in 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 neural networks.
TensorFlow-CPU is a variant of TensorFlow optimized for CPUs, allowing users to utilize TensorFlow on systems without GPU support.
LSTM (Long Short-Term Memory) and GRU (Gated Recurrent Unit) are types of recurrent neural network (RNN) architectures used for sequence modeling tasks.
A denial of service vulnerability allows an attacker to disrupt the normal functioning of a system, rendering it unavailable to legitimate users.
You can update TensorFlow-CPU by using the package manager or manually installing the updated version from the official TensorFlow repository.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-cpu.