CVE-2020-15198: TensorFlow CPU - SparseCountSparseOutput Shape Mismatch Vulnerability
Summary
CVE-2020-15198: In Tensorflow before version 2.3.1, the SparseCountSparseOutput implementation does not validate that the input arguments form a valid sparse tensor. Affects tensorflow-cpu across 2 version ranges.
< 2.3.1
< 3cbb917b4714766030b28eba9fb41bb97ce9ee02
Fixed in 3cbb917b4714766030b28eba9fb41bb97ce9ee02. How to fix ↓
Also tracked for
- tensorflow · Bitnami
- tensorflow · PyPI
- tensorflow-gpu · PyPI
- tensorflow · PyPI
The same CVE-2020-15198 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 that provides a comprehensive ecosystem of tools, libraries, and community resources. It is widely used for building and deploying machine learning models. TensorFlow CPU is a specific package within TensorFlow that focuses on CPU-based computations. This package allows users to leverage the power of CPUs for training and inference tasks. However, a vulnerability has been discovered in the SparseCountSparseOutput implementation of TensorFlow CPU.
Vulnerability Detail
The SparseCountSparseOutput implementation in TensorFlow CPU does not validate the shape of the input tensors, specifically the indices and values tensors. This lack of validation can lead to a shape mismatch, causing accesses outside the bounds of allocated buffers. As a result, this vulnerability can potentially be exploited to trigger memory corruption or crashes. The issue has been patched in TensorFlow version 2.3.1.
How To Fix
Latest published version: 2.21.0 as of 22 Oct 2026
pip install --upgrade "tensorflow-cpu==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-cpu==3cbb917b4714766030b28eba9fb41bb97ce9ee02"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is recommended to apply the fix by updating the TensorFlow CPU package to the latest version.
Conclusion
The SparseCountSparseOutput shape mismatch vulnerability in TensorFlow CPU can lead to memory corruption or crashes. It is crucial to update the TensorFlow CPU package to version 2.3.1 or later to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow-cpu →
FAQ
TensorFlow CPU is a package within the TensorFlow framework that enables CPU-based computations for machine learning tasks.
SparseCountSparseOutput is an implementation in TensorFlow CPU that counts the number of occurrences of each value in a sparse tensor.
This vulnerability can potentially lead to memory corruption or crashes, which could be exploited by an attacker.
Yes, the vulnerability has been patched in TensorFlow version 2.3.1.
You can update your TensorFlow CPU package by running the command 'pip install --upgrade tensorflow-cpu'.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-cpu.