CVE-2020-15213: Denial of Service in tensorflow-lite

tensorflow Updated 02 Oct 2025

Summary

25/09/2020
Yes i
Moderate
4.0

CVE-2020-15213: Denial of service 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-15213 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

TensorFlow is an open-source machine learning framework used for developing and training machine learning models. 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 a denial of service (DoS) attack.

Vulnerability Detail

The vulnerability in TensorFlow Lite arises from the implementation of segment sum, which can be exploited to trigger an out of memory allocation. The code uses the last element of the tensor to determine the dimensionality of the output tensor, allowing attackers to use a very large value to trigger a large allocation. This can result in a DoS condition by causing an out of memory error. The impact of this vulnerability can be significant, as it can disrupt the availability of TensorFlow Lite models.

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 for this vulnerability is to add a custom Verifier to limit the maximum value in the segment ids tensor. This can be done if the segment ids are stored statically in the model. However, if the segment ids are generated at runtime, there is no possible workaround, and upgrading to the patched code is advised.

Conclusion

The vulnerability in TensorFlow Lite can lead to a denial of service condition, impacting the availability of machine learning models. It is crucial to upgrade to the patched versions of TensorFlow (2.2.1 or 2.3.1) to mitigate the risk. Regularly updating TensorFlow and other dependencies is essential to ensure the latest security patches are applied. 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 trigger a denial of service by causing an out of memory allocation in the implementation of segment sum. This can disrupt the availability of TensorFlow Lite models.

To fix this vulnerability, it is recommended to upgrade to TensorFlow 2.2.1 or 2.3.1. Users can update their TensorFlow installation by running the command: pip install --upgrade tensorflow.

A potential workaround is to add a custom Verifier to limit the maximum value in the segment ids tensor. However, this workaround is only applicable if the segment ids are stored statically in the model.

Yes, this vulnerability can be exploited remotely if the affected TensorFlow Lite models are exposed to untrusted inputs.

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