CVE-2020-15198: Heap buffer overflow in Tensorflow
Summary
CVE-2020-15198: Heap buffer overflow in Tensorflow. Affects tensorflow versions >= 2.3.0, < 2.3.1. Fixed in 2.3.1. How to fix ↓
Also tracked for
- tensorflow · Bitnami
- tensorflow-cpu · PyPI
- tensorflow-gpu · PyPI
The same CVE-2020-15198 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 community resources for building and deploying machine learning models. Tensorflow is widely used in various domains, including research, industry, and academia. However, a vulnerability has been discovered in Tensorflow that could lead to a heap buffer overflow.
Vulnerability Detail
The vulnerability, identified as CVE-2020-15198, is a heap buffer overflow in Tensorflow's SparseCountSparseOutput implementation. This vulnerability occurs due to the lack of validation for the shape of the indices tensor, which should match the shape of the values tensor. As a result, a shape mismatch can lead to accesses outside the bounds of heap allocated buffers. An attacker could potentially exploit this vulnerability to execute arbitrary code or cause a denial of service.
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
2.3.1
This is the first release that contains the fix.
pip install --upgrade "tensorflow==2.3.1"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no specific workaround mentioned for this vulnerability. However, users can follow the recommended fix by upgrading to Tensorflow 2.3.1 or later.
Conclusion
In conclusion, the heap buffer overflow vulnerability in Tensorflow (CVE-2020-15198) can be mitigated by upgrading to version 2.3.1 or later. It is important to regularly update Tensorflow to ensure the latest security patches are applied. For further support on vulnerability remediation, you can reach out to DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
The vulnerability can potentially allow an attacker to execute arbitrary code or cause a denial of service by exploiting the heap buffer overflow in Tensorflow.
Versions 2.3.0 and earlier of Tensorflow are affected by this vulnerability. It is recommended to upgrade to version 2.3.1 or later.
To upgrade Tensorflow, you can use the following command: pip install --upgrade tensorflow==2.3.1.
The recommended mitigation is to upgrade to Tensorflow 2.3.1 or later, as this version includes the necessary patches to address the vulnerability.
You can refer to the official security guide of Tensorflow for more information about the security model and how to contact the Tensorflow team with any issues or questions.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.