CVE-2020-15200: Heap Buffer Overflow in TensorFlow
Summary
CVE-2020-15200: 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-15200 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 various deep learning models. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning applications. However, prior to version 2.3.1, TensorFlow is vulnerable to a heap buffer overflow in the RaggedCountSparseOutput implementation.
Vulnerability Detail
The vulnerability arises due to the lack of validation in the RaggedCountSparseOutput implementation of TensorFlow. Specifically, the code fails to verify if the input arguments form a valid ragged tensor. This results in a situation where the values in the splits tensor do not generate a valid partitioning of the values tensor. Consequently, a heap buffer overflow can occur. An important detail is that a BatchedMap in TensorFlow is equivalent to a vector where each element is a hashmap. However, if the first element of splits_values is not 0, the batch_idx will never be 1, leading to the absence of a hashmap at index 0 in per_batch_counts. Attempting to access this absent hashmap in user code triggers a segmentation fault.
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.
Conclusion
In conclusion, TensorFlow versions prior to 2.3.1 are vulnerable to a heap buffer overflow in the RaggedCountSparseOutput implementation. This vulnerability can lead to a segmentation fault and crashing of the application. It is crucial to update TensorFlow to version 2.3.1 or later to mitigate the issue. 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.
This vulnerability can lead to a heap buffer overflow, potentially resulting in a segmentation fault and crashing of the application using TensorFlow.
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 without requiring access to the code or installation.
Yes, the vulnerability is fixed in TensorFlow version 2.3.1. It is recommended to update to this version or later to mitigate the issue.
You can find more information about this vulnerability in the TensorFlow advisory database at https://github.com/pypa/advisory-database/blob/main/vulns/tensorflow/PYSEC-2020-123.yaml
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.