CVE-2021-41210: Heap OOB read in `tf.raw_ops.SparseCountSparseOutput`
7.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.03091%
CWE
Published
11/10/2021
Updated
11/7/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
tensorflow | pip | >= 2.6.0, < 2.6.1 | 2.6.1 |
tensorflow | pip | >= 2.5.0, < 2.5.2 | 2.5.2 |
tensorflow | pip | < 2.4.4 | 2.4.4 |
tensorflow-cpu | pip | >= 2.6.0, < 2.6.1 | 2.6.1 |
tensorflow-cpu | pip | >= 2.5.0, < 2.5.2 | 2.5.2 |
tensorflow-cpu | pip | < 2.4.4 | 2.4.4 |
tensorflow-gpu | pip | >= 2.6.0, < 2.6.1 | 2.6.1 |
tensorflow-gpu | pip | >= 2.5.0, < 2.5.2 | 2.5.2 |
tensorflow-gpu | pip | < 2.4.4 | 2.4.4 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems directly from the unvalidated rank check in SparseCountSparseOutputShapeFn. The commit diff shows the patched version adds a 'WithRank(c->input(0), 2)' check, confirming the original vulnerability was due to missing input rank validation. The C++ code's 'c->Dim(c->input(0), 1)' operation would attempt to read an invalid dimension when given rank-1 indices, matching the OOB read described in the advisory.