CVE-2020-15214: Out of Bounds Write in TensorFlow-Lite

tensorflow Updated 02 Oct 2025

Summary

25/09/2020
Yes i
Critical
8.1

CVE-2020-15214: Out of bounds write 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-15214 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

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

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 is an open-source machine learning framework developed by Google. TensorFlow-Lite is a lightweight version of TensorFlow designed for mobile and embedded devices. It allows developers to deploy machine learning models on resource-constrained platforms. However, a vulnerability has been discovered in TensorFlow-Lite that can lead to an out of bounds write.

Vulnerability Detail

The vulnerability in TensorFlow-Lite occurs when using segment sum in models. If the segment ids are not sorted, it can trigger a write out of bounds or segmentation fault. The code assumes that the segment ids are in increasing order, but if they are not, it allocates insufficient memory for the output tensor and performs a write outside the bounds of the output array. This can result in a segmentation fault or provide a write gadget for future memory corruption-based exploits.

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 sorted. However, this workaround only handles the case when the segment ids are stored statically in the model. If the segment ids are generated at runtime between inference steps, a similar validation could be done. 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 can lead to an out of bounds write or segmentation fault. It is recommended to upgrade to the patched versions of TensorFlow to fix the issue. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

TensorFlow-Lite is a lightweight version of TensorFlow designed for mobile and embedded devices. It allows developers to deploy machine learning models on resource-constrained platforms.

The vulnerability can lead to a write out of bounds or segmentation fault in TensorFlow-Lite models using segment sum. It can also provide a write gadget for future memory corruption-based exploits.

The vulnerability has been patched in TensorFlow versions 2.2.1 and 2.3.1. It is recommended to upgrade to one of these patched versions.

A potential workaround is to add a custom Verifier to the model loading code to ensure that the segment ids are sorted. However, this workaround only handles certain cases. If the segment ids are generated at runtime between inference steps, a similar validation could be done. If the segment ids are generated as outputs of a tensor during inference steps, there are no possible workarounds.

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.

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