CVE-2020-15197: TensorFlow - Denial of Service Vulnerability
Summary
CVE-2020-15197: In Tensorflow before version 2.3.1, the SparseCountSparseOutput implementation does not validate that the input arguments form a valid sparse tensor. Affects tensorflow across 2 version ranges.
< 2.3.1
< 3cbb917b4714766030b28eba9fb41bb97ce9ee02
Fixed in 3cbb917b4714766030b28eba9fb41bb97ce9ee02. How to fix ↓
Also tracked for
- tensorflow · Bitnami
- tensorflow-cpu · PyPI
- tensorflow-gpu · PyPI
The same CVE-2020-15197 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 of tools, libraries, and resources for building and training various types of neural networks. TensorFlow supports both CPU and GPU computations, making it suitable for a wide range of applications. However, a vulnerability has been discovered in versions prior to 2.3.1 that could lead to a denial of service (DoS) attack.
Vulnerability Detail
The vulnerability, identified as CVE-2020-15197, exists in the SparseCountSparseOutput implementation of TensorFlow. This implementation fails to validate the input arguments, specifically the indices tensor, to ensure it forms a valid sparse tensor. The indices tensor is expected to have a rank of 2, representing a matrix. However, malicious users can pass tensors of different ranks, causing a CHECK assertion failure and resulting in a crash. This vulnerability can be exploited by attackers to cause a DoS in serving installations where users have control over the input sparse tensor components.
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
3cbb917b4714766030b28eba9fb41bb97ce9ee02
This is the first release that contains the fix.
pip install --upgrade "tensorflow==3cbb917b4714766030b28eba9fb41bb97ce9ee02"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is essential to update to the patched version of TensorFlow to mitigate the risk of a DoS attack.
Conclusion
The vulnerability in TensorFlow versions prior to 2.3.1 can lead to a denial of service attack. It is crucial to update to the patched version to mitigate the risk. For further assistance or support in vulnerability remediation, you can reach out to DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
TensorFlow is an open-source machine learning framework used for building and training neural networks.
This vulnerability can be exploited by attackers to cause a denial of service (DoS) in TensorFlow serving installations.
To fix this vulnerability, update TensorFlow to version 2.3.1 or later.
No, there is no known workaround for this vulnerability. Updating to the patched version is necessary.
For more information, you can refer to the official TensorFlow advisory and the CVE entry (CVE-2020-15197).
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.