CVE-2020-15197 is a medium-severity (CVSS 6.3) Improper Input Validation vulnerability in tensorflow. 1 public exploit reference exists, so weaponization risk is real. A fix is available for tensorflow — see the affected versions and patch details below.
Denial of Service in Tensorflow
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2020-15197 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,386 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
tensorflow🐍tensorflow-cpu🐍tensorflow-gpuReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
Impact
The SparseCountSparseOutput implementation does not validate that the input arguments form a valid sparse tensor. In particular, there is no validation that the indices tensor has rank 2. This tensor must be a matrix because code assumes its elements are accessed as elements of a matrix:
https://github.com/tensorflow/tensorflow/blob/0e68f4d3295eb0281a517c3662f6698992b7b2cf/tensorflow/core/kernels/count_ops.cc#L185
However, malicious users can pass in tensors of different rank, resulting in a CHECK assertion failure and a crash. This can be used to cause denial of service in serving installations, if users are allowed to control the components of the input sparse tensor.
Patches
We have patched the issue in 3cbb917b4714766030b28eba9fb41bb97ce9ee02 and will release a patch release.
We recommend users to upgrade to TensorFlow 2.3.1.
For more information
Please consult our security guide for more information regarding the security model and how to contact us with issues and questions.
Attribution
This vulnerability is a variant of GHSA-p5f8-gfw5-33w4
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | tensorflow | ≥ 2.3.0&&< 2.3.1 | 2.3.1pip install --upgrade 'tensorflow==2.3.1' |
| 🐍PyPI | tensorflow-cpu | ≥ 2.3.0&&< 2.3.1 | 2.3.1pip install --upgrade 'tensorflow-cpu==2.3.1' |
| 🐍PyPI | tensorflow-gpu | ≥ 2.3.0&&< 2.3.1 | 2.3.1pip install --upgrade 'tensorflow-gpu==2.3.1' |
Affected Products
tensorflowgoogleResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for tensorflow, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update tensorflow to 2.3.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2020-15197 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Frequently Asked Questions
Is CVE-2020-15197 in your dependencies?
Find it across PyPI, including transitive dependencies.