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

tensorflow Updated 02 Oct 2025

Summary

25/09/2020
Yes i
Critical
8.1

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

>= 2.2.0, < 2.2.1 >= 2.3.0, < 2.3.1

Fixed in 2.2.1 or 2.3.1, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2020-15212 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

TensorFlow Lite is an open-source deep learning framework designed for mobile and embedded devices. It allows developers to deploy machine learning models on resource-constrained platforms. TensorFlow Lite provides efficient inference with low latency and small model sizes. However, a vulnerability has been discovered in TensorFlow Lite that can lead to out of bounds access.

Vulnerability Detail

The vulnerability in TensorFlow Lite arises when using segment sum, which can trigger writes outside of the bounds of heap allocated buffers. By inserting negative elements in the segment ids tensor, users with access to segment_ids_data can alter output_index and write outside of the output_data buffer. This can result in a segmentation fault and potentially be exploited to corrupt memory or create advanced exploits. The vulnerability has been patched in TensorFlow versions 2.2.1 and 2.3.1.

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.

  • >= 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 is to add a custom Verifier to the model loading code to ensure that the segment ids are all positive. This workaround can handle cases where the segment ids are stored statically in the model. If the segment ids are generated at runtime between inference steps, a similar validation can be performed. However, if the segment ids are generated as outputs of a tensor during inference steps, there are no possible workarounds, and upgrading to the patched code is advised.

Conclusion

The vulnerability in TensorFlow Lite that allows out of bounds access has been addressed in patched versions 2.2.1 and 2.3.1. It is recommended to upgrade to these versions to mitigate the 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 deep learning framework designed for mobile and embedded devices. It allows developers to deploy machine learning models on resource-constrained platforms.

The vulnerability in TensorFlow Lite can lead to out of bounds access, potentially resulting in a segmentation fault and memory corruption. It can also be exploited in combination with other vulnerabilities to create more advanced exploits.

To fix the vulnerability, it is recommended to upgrade to TensorFlow 2.2.1 or 2.3.1, which contain the necessary patches to address the issue.

A potential workaround is to add a custom Verifier to the model loading code to ensure that the segment ids are all positive. However, this workaround only handles cases where the segment ids are stored statically in the model. If the segment ids are generated at runtime between inference steps or as outputs of a tensor during inference steps, there are no possible workarounds.

For more information regarding the security model of TensorFlow Lite and how to contact the TensorFlow team with issues and questions, please consult the TensorFlow security guide.

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.

  • >= 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