CVE-2021-29607: Incomplete validation in `SparseSparseMinimum`
5.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.14711%
CWE
Published
3/18/2022
Updated
11/13/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
tensorflow | pip | < 2.1.4 | 2.1.4 |
tensorflow | pip | >= 2.2.0, < 2.2.3 | 2.2.3 |
tensorflow | pip | >= 2.3.0, < 2.3.3 | 2.3.3 |
tensorflow | pip | >= 2.4.0, < 2.4.2 | 2.4.2 |
tensorflow-cpu | pip | < 2.1.4 | 2.1.4 |
tensorflow-cpu | pip | >= 2.2.0, < 2.2.3 | 2.2.3 |
tensorflow-cpu | pip | >= 2.3.0, < 2.3.3 | 2.3.3 |
tensorflow-cpu | pip | >= 2.4.0, < 2.4.2 | 2.4.2 |
tensorflow-gpu | pip | < 2.1.4 | 2.1.4 |
tensorflow-gpu | pip | >= 2.2.0, < 2.2.3 | 2.2.3 |
tensorflow-gpu | pip | >= 2.3.0, < 2.3.3 | 2.3.3 |
tensorflow-gpu | pip | >= 2.4.0, < 2.4.2 | 2.4.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from missing validation checks in the SparseSparseBinaryOpShared::Compute function, as shown in the commit diffs. The original code lacked checks for:
- Empty tensors (num_dims > 0)
- a_shape_t->NumElements() == num_dims (shape/indices dimension alignment)
- Matching indices dimensions between a and b inputs These missing validations were explicitly added in the patches to sparse_sparse_binary_op_shared.cc, confirming this function as the vulnerable entry point. The CWE-754 classification further supports that this is an improper validation of exceptional conditions scenario.