CVE-2020-15197: Denial of Service Vulnerability in tensorflow-cpu
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-cpu across 2 version ranges.
< 2.3.1
< 3cbb917b4714766030b28eba9fb41bb97ce9ee02
Fixed in 3cbb917b4714766030b28eba9fb41bb97ce9ee02. How to fix ↓
Also tracked for
- tensorflow · Bitnami
- tensorflow · PyPI
- tensorflow-gpu · PyPI
- tensorflow · 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 developed by Google. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning models. The tensorflow-cpu package is a Python package that allows users to run Tensorflow on CPUs. It is widely used in various applications and environments.
Vulnerability Detail
The vulnerability (CVE-2020-15197) exists in versions of Tensorflow before 2.3.1. It is caused by a lack of validation in the SparseCountSparseOutput implementation. Specifically, the implementation does not verify that the indices tensor, which is expected to be a matrix, has a rank of 2. This can be exploited by malicious users to pass tensors of different ranks, leading to a CHECK assertion failure and a crash. If users are allowed to control the components of the input sparse tensor, this vulnerability can be used to cause denial of service in serving installations. The issue has been patched in commit 3cbb917b4714766030b28eba9fb41bb97ce9ee02 and is released in TensorFlow version 2.3.1.
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 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-cpu==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 recommended to apply the fix by upgrading to TensorFlow version 2.3.1 or later.
Conclusion
The vulnerability (CVE-2020-15197) in tensorflow-cpu versions before 2.3.1 allows for a denial of service attack if users can control the input sparse tensor. To mitigate this vulnerability, it is recommended to upgrade to TensorFlow version 2.3.1 or later. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow-cpu →
FAQ
The vulnerability can be exploited to cause denial of service in serving installations of TensorFlow if users are allowed to control the components of the input sparse tensor.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply upload your Pipfile.lock and Vulert will analyze it in real-time.
No, there is no known workaround for this vulnerability. It is recommended to upgrade to TensorFlow version 2.3.1 or later.
No, this vulnerability requires the attacker to have control over the components of the input sparse tensor. It cannot be exploited remotely.
There are no known public exploits available for this vulnerability at the time of writing.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-cpu.