CVE-2020-15211: Out of Bounds Access in TensorFlow Lite

tensorflow Updated 02 Oct 2025

Summary

25/09/2020
Yes i
Moderate
4.8

CVE-2020-15211: Out of bounds access in tensorflow-lite. Affects tensorflow across 5 version ranges.

< 1.15.4 >= 2.0.0, < 2.0.3 >= 2.1.0, < 2.1.2 >= 2.2.0, < 2.2.1 >= 2.3.0, < 2.3.1

Fixed in 5 releases; the minimum fixed version depends on the release line you run. How to fix ↓

Also tracked for

The same CVE-2020-15211 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

TensorFlow Lite is an open-source machine learning framework designed for mobile and embedded devices. It allows developers to deploy machine learning models on resource-constrained platforms. TensorFlow Lite models are saved in the flatbuffer format, which uses a double indexing scheme for subgraphs, operators, and input/output tensors. However, some operators can have optional tensors, indicated by a negative index value of -1. This vulnerability arises from the fact that the -1 index is considered valid for any operator, including those that don't expect optional inputs or outputs. As a result, it allows for out-of-bounds access to heap allocated arrays, although limited in scope.

Vulnerability Detail

The vulnerability in TensorFlow Lite allows for both read and write gadgets, although the impact is relatively limited. By exploiting the double indexing scheme and the use of the -1 index for optional tensors, an attacker can write and read data outside the bounds of heap allocated arrays. This can potentially lead to memory corruption or information disclosure. However, the specific offset from the start of the arrays limits the extent of the vulnerability.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

pip install --upgrade "tensorflow==2.21.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 1.15.4 1.15.4
    pip install --upgrade "tensorflow==1.15.4"
  • >= 2.0.0, < 2.0.3 2.0.3
    pip install --upgrade "tensorflow==2.0.3"
  • >= 2.1.0, < 2.1.2 2.1.2
    pip install --upgrade "tensorflow==2.1.2"
  • >= 2.2.0, < 2.2.1 2.2.1
    pip install --upgrade "tensorflow==2.2.1"
  • >= 2.3.0, < 2.3.1 2.3.1
    pip install --upgrade "tensorflow==2.3.1"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

A potential workaround for this vulnerability is to add a custom Verifier to the model loading code. This Verifier would ensure that only operators accepting optional inputs use the -1 special value, and only for the expected optional tensors. However, this approach is error-prone, and it is strongly advised to upgrade to the patched code instead.

Conclusion

The vulnerability in TensorFlow Lite allows for out-of-bounds access to heap allocated arrays, potentially leading to memory corruption or information disclosure. It is crucial to upgrade to the patched versions of TensorFlow to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

TensorFlow Lite is an open-source machine learning framework designed for mobile and embedded devices. It allows developers to deploy machine learning models on resource-constrained platforms.

The vulnerability allows for out-of-bounds access to heap allocated arrays in TensorFlow Lite. This can potentially lead to memory corruption or information disclosure, although the impact is limited due to the specific offset from the start of the arrays.

To fix this vulnerability, it is recommended to upgrade to the patched versions of TensorFlow. The TensorFlow team has released patch releases for versions 1.15, 2.0, 2.1, 2.2, and 2.3. Users should update to TensorFlow 1.15.4, 2.0.3, 2.1.2, 2.2.1, or 2.3.1.

A potential workaround is to add a custom Verifier to the model loading code, ensuring that only operators accepting optional inputs use the -1 special value for the expected optional tensors. However, this approach is error-prone, and it is recommended to upgrade to the patched code instead.

This vulnerability was reported by members of the Aivul Team from Qihoo 360.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

pip install --upgrade "tensorflow==2.21.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 1.15.4 1.15.4
    pip install --upgrade "tensorflow==1.15.4"
  • >= 2.0.0, < 2.0.3 2.0.3
    pip install --upgrade "tensorflow==2.0.3"
  • >= 2.1.0, < 2.1.2 2.1.2
    pip install --upgrade "tensorflow==2.1.2"
  • >= 2.2.0, < 2.2.1 2.2.1
    pip install --upgrade "tensorflow==2.2.1"
  • >= 2.3.0, < 2.3.1 2.3.1
    pip install --upgrade "tensorflow==2.3.1"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback