CVE-2020-15208: TensorFlow Lite Common Dimension Size Mismatch

tensorflow Updated 02 Oct 2025

Summary

25/09/2020
Yes i
High
7.4

CVE-2020-15208: In tensorflow-lite before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, when determining the common dimension size of two tensors, TFLite uses a DCHECK which is no-op outside of debug compilation modes. Affects tensorflow across 6 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 < 8ee24e7949a203d234489f9da2c5bf45a7d5157d

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-15208 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 is an open-source machine learning framework developed by Google. It provides a comprehensive ecosystem of tools, libraries, and community resources for building and deploying machine learning models. TensorFlow Lite is a lightweight version of TensorFlow designed for mobile and embedded devices. It allows developers to run machine learning models on resource-constrained platforms. However, versions of TensorFlow Lite prior to 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 2.3.1 are vulnerable to a common dimension size mismatch issue.

Vulnerability Detail

The common dimension size mismatch vulnerability in TensorFlow Lite occurs when determining the common dimension size of two tensors. The function responsible for this task uses a DCHECK statement, which is a no-op outside of debug compilation modes. As a result, the function always returns the dimension of the first tensor, even if it is larger than the dimension of the second tensor. This discrepancy can lead to reads and writes outside of bounds, as the interpreter assumes there is enough data in both tensors. Malicious attackers can exploit this vulnerability to craft cases where the first tensor's dimension is larger than the second, causing potential data corruption or unauthorized access.

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

There is no known workaround for this vulnerability. It is essential to update TensorFlow Lite to the patched versions mentioned above.

Conclusion

The common dimension size mismatch vulnerability in TensorFlow Lite can have severe consequences, including data corruption and unauthorized access. It is crucial for developers to update their TensorFlow Lite installations to the patched versions to mitigate the risk. For further support on vulnerability remediation and securing your machine learning models, please contact DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

TensorFlow Lite is a lightweight version of TensorFlow designed for running machine learning models on resource-constrained platforms such as mobile and embedded devices.

The common dimension size mismatch vulnerability in TensorFlow Lite can lead to data corruption or unauthorized access. Attackers can exploit this vulnerability to manipulate tensor dimensions and potentially compromise the integrity of machine learning models.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply provide your Pipfile.lock, and Vulert will analyze it for open-source vulnerabilities, including this TensorFlow Lite vulnerability.

No, there are no known workarounds for this vulnerability. It is crucial to update TensorFlow Lite to the patched versions to mitigate the risk.

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