CVE-2021-37687: Heap OOB in TFLite's `Gather*` implementations
5.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.12677%
CWE
Published
8/25/2021
Updated
11/13/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:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
tensorflow | pip | < 2.3.4 | 2.3.4 |
tensorflow | pip | >= 2.4.0, < 2.4.3 | 2.4.3 |
tensorflow | pip | = 2.5.0 | 2.5.1 |
tensorflow-cpu | pip | < 2.3.4 | 2.3.4 |
tensorflow-cpu | pip | >= 2.4.0, < 2.4.3 | 2.4.3 |
tensorflow-cpu | pip | = 2.5.0 | 2.5.1 |
tensorflow-gpu | pip | < 2.3.4 | 2.3.4 |
tensorflow-gpu | pip | >= 2.4.0, < 2.4.3 | 2.4.3 |
tensorflow-gpu | pip | = 2.5.0 | 2.5.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from missing negative index validation in TFLite's gather operations. The commit diffs show:
- In gather_nd.cc, EvalGatherNd was modified to add a loop checking for negative indices (bb6a038)
- In gather.cc, both the Gather template and GatherStrings functions were patched to include negative index checks (eb92112)
- The original implementations processed indices directly without validation, as evidenced by the code snippets from the vulnerable versions
- The CWE-125 classification confirms this is an OOB read vulnerability caused by improper index validation