CVE-2020-15205: Data Leak in Tensorflow
Summary
CVE-2020-15205: Data leak in Tensorflow. Affects tensorflow across 5 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
Fixed in 5 releases; the minimum fixed version depends on the release line you run. How to fix ↓
Also tracked for
- tensorflow · Bitnami
- tensorflow-cpu · PyPI
- tensorflow-gpu · 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 resources for building and deploying machine learning models. Tensorflow is widely used in various domains, including research, academia, and industry. However, a vulnerability has been discovered in Tensorflow that can lead to a data leak and potential heap overflow errors.
Vulnerability Detail
The vulnerability, identified as CVE-2020-15205, exists in the data_splits argument of the tf.raw_ops.StringNGrams function in Tensorflow. This argument lacks proper validation, allowing an attacker to pass values that can cause heap overflow errors and leak the contents of memory. By exploiting this vulnerability, an attacker can potentially access sensitive information, defeat Address Space Layout Randomization (ASLR), and execute arbitrary code.
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 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==1.15.4" -
>= 2.0.0, < 2.0.32.0.3pip install --upgrade "tensorflow==2.0.3" -
>= 2.1.0, < 2.1.22.1.2pip install --upgrade "tensorflow==2.1.2" -
>= 2.2.0, < 2.2.12.2.1pip install --upgrade "tensorflow==2.2.1" -
>= 2.3.0, < 2.3.12.3.1pip install --upgrade "tensorflow==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
As a temporary workaround, users can avoid using the tf.raw_ops.StringNGrams function with untrusted input or disable its usage until the patch is applied. It is important to note that workarounds may not provide complete protection and upgrading to the patched versions is the recommended solution.
Conclusion
CVE-2020-15205 is a critical vulnerability in Tensorflow that allows for a data leak and potential heap overflow errors. It is crucial to upgrade to the patched versions of Tensorflow (1.15.4, 2.0.3, 2.1.2, 2.2.1, or 2.3.1) to mitigate the risk. Workarounds may provide temporary protection, but they are not a substitute for applying the patches. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
The vulnerability allows an attacker to leak the contents of memory, potentially accessing sensitive information and defeating ASLR. This can lead to unauthorized access, data breaches, and remote code execution.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities, using only the Pipfile.lock file.
At the time of this advisory, there are no known public exploits for this vulnerability. However, it is important to apply the patches as soon as possible to mitigate the risk.
Yes, this vulnerability can be exploited remotely. An attacker can send specially crafted input to the vulnerable function, leading to a data leak and potential code execution.
For more information, please refer to the TensorFlow security guide at https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md. This guide provides details about the security model, how to contact the TensorFlow team with issues, and general security best practices.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.