CVE-2020-15198: TensorFlow GPU - Access Outside Bounds of Heap Allocated Buffers
Summary
CVE-2020-15198: In Tensorflow before version 2.3.1, the SparseCountSparseOutput implementation does not validate that the input arguments form a valid sparse tensor. Affects tensorflow-gpu across 2 version ranges.
< 2.3.1
< 3cbb917b4714766030b28eba9fb41bb97ce9ee02
Fixed in 3cbb917b4714766030b28eba9fb41bb97ce9ee02. How to fix ↓
Also tracked for
- tensorflow · Bitnami
- tensorflow · PyPI
- tensorflow-cpu · PyPI
- tensorflow · 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 GPU is a Python library for numerical computation that uses data flow graphs. It is widely used for machine learning and deep learning tasks. The library provides a set of tools and APIs for building and training neural networks. TensorFlow GPU is vulnerable to an issue in the SparseCountSparseOutput implementation, where it fails to validate the shape of the indices tensor, leading to potential access outside the bounds of heap allocated buffers.
Vulnerability Detail
The vulnerability in TensorFlow GPU arises from the lack of validation of the indices tensor shape in the SparseCountSparseOutput implementation. This can result in accessing values outside the allocated buffer, leading to potential heap buffer overflow. An attacker could exploit this vulnerability to execute arbitrary code or cause a denial of service. The issue has been patched in TensorFlow version 2.3.1.
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 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-gpu==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 upgrade to the patched version of TensorFlow GPU.
Conclusion
The vulnerability in TensorFlow GPU (CVE-2020-15198) allows for potential access outside the bounds of heap allocated buffers, which can lead to arbitrary code execution or denial of service. It is crucial to upgrade to TensorFlow version 2.3.1 or later to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow-gpu →
FAQ
TensorFlow GPU is a Python library for numerical computation that is optimized for running on GPUs. It provides tools and APIs for building and training neural networks.
This vulnerability can potentially allow an attacker to execute arbitrary code or cause a denial of service by accessing values outside the allocated buffer.
You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply provide your Pipfile.lock and it will analyze and alert you in real-time.
No, there is no known workaround for this vulnerability. It is recommended to upgrade to the patched version of TensorFlow GPU.
You can find more information about this vulnerability in the TensorFlow GPU advisory database at https://github.com/pypa/advisory-database/blob/main/vulns/tensorflow-gpu/PYSEC-2020-313.yaml
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.