CVE-2021-37687
published 2021-08-12CVE-2021-37687: TensorFlow is an end-to-end open source platform for machine learning. In affected versions TFLite's [`GatherNd`…
PriorityP426medium5.5CVSS 3.1
AVLACLPRLUINSUCHINAN
EPSS
0.19%
9.0th percentile
TensorFlow is an end-to-end open source platform for machine learning. In affected versions TFLite's [`GatherNd` implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/gather_nd.cc#L124) does not support negative indices but there are no checks for this situation. Hence, an attacker can read arbitrary data from the heap by carefully crafting a model with negative values in `indices`. Similar issue exists in [`Gather` implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/gather.cc). We have patched the issue in GitHub commits bb6a0383ed553c286f87ca88c207f6774d5c4a8f and eb921122119a6b6e470ee98b89e65d721663179d. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.
Affected
14 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | tensorflow | — | — |
| tensorflow | — | — | |
| tensorflow | — | — | |
| tensorflow | >= 2.3.0 < 2.3.4 | 2.3.4 | |
| tensorflow | >= 2.4.0 < 2.4.3 | 2.4.3 | |
| intel | optimization_for_tensorflow | < bb6a0383ed553c286f87ca88c207f6774d5c4a8f | bb6a0383ed553c286f87ca88c207f6774d5c4a8f |
| intel | optimization_for_tensorflow | >= 0 < 2.3.4 | 2.3.4 |
| intel | optimization_for_tensorflow | >= 0 < eb921122119a6b6e470ee98b89e65d721663179d | eb921122119a6b6e470ee98b89e65d721663179d |
| intel | optimization_for_tensorflow | >= 2.3.0 < 2.3.4 | 2.3.4 |
| intel | optimization_for_tensorflow | >= 2.4.0 < 2.4.3 | 2.4.3 |
| intel | optimization_for_tensorflow | >= 2.5.0 < 2.5.1 | 2.5.1 |
| tensorflow | tensorflow | < 2.3.4 | 2.3.4 |
| tensorflow | tensorflow | — | — |
| tensorflow | tensorflow | — | — |
CVSS provenance
nvdv3.15.5MEDIUMCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
nvdv2.02.1LOWAV:L/AC:L/Au:N/C:P/I:N/A:N
vendor_debian5.5LOW
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
Heap OOB in TFLite's `Gather*` implementations
osv·2021-08-25
CVE-2021-37687 [MEDIUM] Heap OOB in TFLite's `Gather*` implementations
Heap OOB in TFLite's `Gather*` implementations
### Impact
TFLite's [`GatherNd` implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/gather_nd.cc#L124) does not support negative indices but there are no checks for this situation.
Hence, an attacker can read arbitrary data from the heap by carefully crafting a model with negative values in `indices`.
Similar issue exists in [`Gather` implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/gather.cc).
```python
import tensorflow as tf
import numpy as np
tf.compat.v1.disable_v2_behavior()
params = tf.compat.v1.placeholder(name="params", dtype=tf.int64, shape=(1,))
indices = tf.compat.v1.placehold
GHSA
Heap OOB in TFLite's `Gather*` implementations
ghsa·2021-08-25
CVE-2021-37687 [MEDIUM] CWE-125 Heap OOB in TFLite's `Gather*` implementations
Heap OOB in TFLite's `Gather*` implementations
### Impact
TFLite's [`GatherNd` implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/gather_nd.cc#L124) does not support negative indices but there are no checks for this situation.
Hence, an attacker can read arbitrary data from the heap by carefully crafting a model with negative values in `indices`.
Similar issue exists in [`Gather` implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/gather.cc).
```python
import tensorflow as tf
import numpy as np
tf.compat.v1.disable_v2_behavior()
params = tf.compat.v1.placeholder(name="params", dtype=tf.int64, shape=(1,))
indices = tf.compat.v1.placehold
OSV
CVE-2021-37687: TensorFlow is an end-to-end open source platform for machine learning
osv·2021-08-12
CVE-2021-37687 CVE-2021-37687: TensorFlow is an end-to-end open source platform for machine learning
TensorFlow is an end-to-end open source platform for machine learning. In affected versions TFLite's [`GatherNd` implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/gather_nd.cc#L124) does not support negative indices but there are no checks for this situation. Hence, an attacker can read arbitrary data from the heap by carefully crafting a model with negative values in `indices`. Similar issue exists in [`Gather` implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/gather.cc). We have patched the issue in GitHub commits bb6a0383ed553c286f87ca88c207f6774d5c4a8f and eb921122119a6b6e470ee98b89e65d721663179d. The fix will be included in TensorFlo
Debian
CVE-2021-37687: tensorflow - TensorFlow is an end-to-end open source platform for machine learning. In affect...
vendor_debian·2021·CVSS 5.5
CVE-2021-37687 [MEDIUM] CVE-2021-37687: tensorflow - TensorFlow is an end-to-end open source platform for machine learning. In affect...
TensorFlow is an end-to-end open source platform for machine learning. In affected versions TFLite's [`GatherNd` implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/gather_nd.cc#L124) does not support negative indices but there are no checks for this situation. Hence, an attacker can read arbitrary data from the heap by carefully crafting a model with negative values in `indices`. Similar issue exists in [`Gather` implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/gather.cc). We have patched the issue in GitHub commits bb6a0383ed553c286f87ca88c207f6774d5c4a8f and eb921122119a6b6e470ee98b89e65d721663179d. The fix will be included in TensorFlo
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/tensorflow/tensorflow/commit/bb6a0383ed553c286f87ca88c207f6774d5c4a8fhttps://github.com/tensorflow/tensorflow/commit/eb921122119a6b6e470ee98b89e65d721663179dhttps://github.com/tensorflow/tensorflow/security/advisories/GHSA-jwf9-w5xm-f437https://github.com/tensorflow/tensorflow/commit/bb6a0383ed553c286f87ca88c207f6774d5c4a8fhttps://github.com/tensorflow/tensorflow/commit/eb921122119a6b6e470ee98b89e65d721663179dhttps://github.com/tensorflow/tensorflow/security/advisories/GHSA-jwf9-w5xm-f437
2021-08-12
Published