CVE-2020-15205: TensorFlow GPU - Heap Overflow and Memory Leak in StringNGrams
Summary
CVE-2020-15205: In Tensorflow before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, the data_splits argument of tf.raw_ops.StringNGrams lacks validation. Affects tensorflow-gpu across 6 version ranges.
< 1.15.4
>= 2.0.0, < 2.0.3
>= 2.1.0, < 2.1.2
>= 2.2.0, < 2.2.1
>= 2.3.0, < 2.3.1
< 0462de5b544ed4731aa2fb23946ac22c01856b80
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-cpu · PyPI
- tensorflow · PyPI
The same CVE-2020-15205 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 GPU is a variant of TensorFlow that leverages GPU acceleration for faster computation. This vulnerability affects versions of TensorFlow GPU before 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 2.3.1.
Vulnerability Detail
The vulnerability (CVE-2020-15205) resides in the data_splits argument of the tf.raw_ops.StringNGrams function in TensorFlow GPU. This argument lacks proper validation, allowing a user to pass values that can trigger heap overflow errors and potentially leak the contents of memory. An attacker could exploit this issue to retrieve sensitive information from the memory stack, including return addresses, which can be used to bypass Address Space Layout Randomization (ASLR) protections. The vulnerability has been patched in commit 0462de5b544ed4731aa2fb23946ac22c01856b80 and is addressed in TensorFlow versions 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 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 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.41.15.4pip install --upgrade "tensorflow-gpu==1.15.4" -
>= 2.0.0, < 2.0.32.0.3pip install --upgrade "tensorflow-gpu==2.0.3" -
>= 2.1.0, < 2.1.22.1.2pip install --upgrade "tensorflow-gpu==2.1.2" -
>= 2.2.0, < 2.2.12.2.1pip install --upgrade "tensorflow-gpu==2.2.1" -
>= 2.3.0, < 2.3.12.3.1pip install --upgrade "tensorflow-gpu==2.3.1"
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 crucial to update to the patched versions of TensorFlow GPU to mitigate the risk of exploitation.
Conclusion
The vulnerability (CVE-2020-15205) in TensorFlow GPU allows for heap overflow errors and memory leaks, potentially leading to the exposure of sensitive information and bypassing ASLR protections. It is crucial to update to the patched versions (1.15.4, 2.0.3, 2.1.2, 2.2.1, or 2.3.1) to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow-gpu →
FAQ
TensorFlow GPU is a variant of TensorFlow that utilizes GPU acceleration for faster machine learning computations.
This vulnerability can lead to heap overflow errors and memory leaks, potentially exposing sensitive information and allowing attackers to bypass ASLR protections.
You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. No signup is required, and Vulert will analyze your Pipfile.lock to provide real-time alerts for open-source vulnerabilities.
No, there are no known workarounds for this vulnerability. Updating to the patched versions of TensorFlow GPU is the recommended solution.
You can find more information about this vulnerability in the TensorFlow GPU advisory PYSEC-2020-320 at https://github.com/pypa/advisory-database/blob/main/vulns/tensorflow-gpu/PYSEC-2020-320.yaml.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.