CVE-2020-15195: TensorFlow - Heap Buffer Overflow in SparseFillEmptyRowsGrad
Summary
CVE-2020-15195: In Tensorflow before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, the implementation of SparseFillEmptyRowsGrad uses a double indexing pattern. Affects tensorflow 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
< 390611e0d45c5793c7066110af37c8514e6a6c54
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-15195 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, industry, and academia. However, versions before 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 2.3.1 are vulnerable to a heap buffer overflow in the implementation of SparseFillEmptyRowsGrad.
Vulnerability Detail
The vulnerability arises due to a double indexing pattern used in the implementation of SparseFillEmptyRowsGrad. This can lead to an out-of-bounds access of the grad_values array, resulting in a heap buffer overflow. An attacker could potentially exploit this vulnerability to execute arbitrary code or cause a denial-of-service condition. The issue has been patched in commit 390611e0d45c5793c7066110af37c8514e6a6c54 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.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
There is no known workaround for this vulnerability. It is strongly advised to update to the patched versions mentioned above.
Conclusion
The vulnerability in TensorFlow versions before 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 2.3.1 can lead to a heap buffer overflow. It is crucial to update to the patched versions to mitigate the risk of exploitation. For further support on vulnerability remediation, contact DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
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.
This vulnerability can potentially allow an attacker to execute arbitrary code or cause a denial-of-service condition.
To fix this vulnerability, update TensorFlow to one of the patched versions: 1.15.4, 2.0.3, 2.1.2, 2.2.1, or 2.3.1.
No, there is no known workaround for this vulnerability. It is recommended to update to the patched versions.
For more information, refer to the official TensorFlow repository and the CVE-2020-15195 advisory.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.