CVE-2020-15201: Heap Buffer Overflow in TensorFlow
Summary
CVE-2020-15201: In Tensorflow before version 2.3.1, the RaggedCountSparseOutput implementation does not validate that the input arguments form a valid ragged tensor. Affects tensorflow across 2 version ranges.
< 2.3.1
< 3cbb917b4714766030b28eba9fb41bb97ce9ee02
Fixed in 3cbb917b4714766030b28eba9fb41bb97ce9ee02. How to fix ↓
Also tracked for
- tensorflow · Bitnami
- tensorflow-cpu · PyPI
- tensorflow-gpu · PyPI
The same CVE-2020-15201 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 widely used for developing and training deep learning models. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning applications. However, a vulnerability has been discovered in versions before 2.3.1 that could lead to a heap buffer overflow.
Vulnerability Detail
The vulnerability (CVE-2020-15201) exists in the RaggedCountSparseOutput implementation of TensorFlow. It arises due to the lack of validation for the input arguments, specifically the splits tensor. This tensor is responsible for partitioning the values tensor, and if the values in splits do not form a valid partitioning, a heap buffer overflow can occur. This can be triggered when the split_values does not end with a value at least num_values, causing a read outside the bounds of split_values once batch_idx becomes too large. 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==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==3cbb917b4714766030b28eba9fb41bb97ce9ee02"
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. The recommended approach is to upgrade to the patched version of TensorFlow.
Conclusion
In conclusion, the vulnerability (CVE-2020-15201) in TensorFlow before version 2.3.1 can lead to a heap buffer overflow. It is crucial to upgrade to the patched version to ensure the security and stability of machine learning applications. For further support on vulnerability remediation, you can reach out to DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
TensorFlow is an open-source machine learning framework used for developing and training deep learning models.
The vulnerability can lead to a heap buffer overflow, which may allow an attacker to execute arbitrary code or cause a denial of service.
You can use Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. It analyzes your Pipfile.lock and provides real-time alerts for open-source vulnerabilities.
Yes, the vulnerability has been patched in TensorFlow version 2.3.1. It is recommended to upgrade to this version or later to mitigate the issue.
You can refer to the official GitHub advisory database for more details on this vulnerability. The source can be found at: https://github.com/pypa/advisory-database/blob/main/vulns/tensorflow/PYSEC-2020-124.yaml
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.