Related Vulnerabilities: CVE-2021-37685  

In TensorFlow before version 2.6.0 TFLite's expand_dims.cc contains a vulnerability which allows reading one element outside of bounds of heap allocated data. If axis is a large negative value (e.g., -100000), then after the first if it would still be negative. The check following the if statement will pass and the for loop would read one element before the start of input_dims.data (when i = 0).

Severity Medium

Remote No

Type Information disclosure

Description

In TensorFlow before version 2.6.0 TFLite's expand_dims.cc contains a vulnerability which allows reading one element outside of bounds of heap allocated data. If axis is a large negative value (e.g., -100000), then after the first if it would still be negative. The check following the if statement will pass and the for loop would read one element before the start of input_dims.data (when i = 0).

AVG-2292 tensorflow 2.5.0-6 2.5.1-1 Critical Fixed

https://github.com/tensorflow/tensorflow/security/advisories/GHSA-c545-c4f9-rf6v
https://github.com/tensorflow/tensorflow/commit/d94ffe08a65400f898241c0374e9edc6fa8ed257