CVE-2020-15208: Data corruption in tensorflow-lite
Summary
CVE-2020-15208: Data corruption 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
- tensorflow · Bitnami
- tensorflow-cpu · PyPI
- tensorflow-gpu · PyPI
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.
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.
No signup required · Results in about 60 seconds
Background
TensorFlow is an open-source machine learning framework developed by Google. It provides a comprehensive ecosystem of tools, libraries, and community resources that enable researchers and developers to build and deploy 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, a vulnerability has been discovered in TensorFlow Lite that can lead to data corruption and potential security risks.
Vulnerability Detail
The vulnerability in TensorFlow Lite arises from a flaw in the common dimension size determination process between two tensors. The code responsible for this calculation uses a DCHECK statement, which is only active in debug compilation modes. As a result, in non-debug modes, the function always returns the dimension of the first tensor, regardless of the actual sizes of the tensors. This can be exploited by malicious attackers to craft scenarios where the first tensor's dimension is larger than that of the second tensor. Consequently, the interpreter will incorrectly assume that there is enough data in both tensors, leading to out-of-bounds reads and writes. This can result in data corruption, crashes, or even arbitrary code execution.
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.41.15.4pip install --upgrade "tensorflow==1.15.4" -
>= 2.0.0, < 2.0.32.0.3pip install --upgrade "tensorflow==2.0.3" -
>= 2.1.0, < 2.1.22.1.2pip install --upgrade "tensorflow==2.1.2" -
>= 2.2.0, < 2.2.12.2.1pip install --upgrade "tensorflow==2.2.1" -
>= 2.3.0, < 2.3.12.3.1pip 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
As a workaround, users can consider using debug compilation modes during development and testing to activate the DCHECK statement and detect potential dimension size discrepancies. This can help identify and fix issues before deploying the TensorFlow Lite models in non-debug modes. However, it is crucial to note that this workaround is not a substitute for applying the official patch and upgrading to the latest secure version of TensorFlow Lite.
Conclusion
The vulnerability in TensorFlow Lite can lead to data corruption and potential security risks. It is crucial to upgrade to the patched versions of TensorFlow (1.15.4, 2.0.3, 2.1.2, 2.2.1, or 2.3.1) to mitigate the risk. Regularly checking for security updates and following best practices for secure machine learning model deployment is also recommended. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
TensorFlow Lite is a lightweight version of TensorFlow designed for mobile and embedded devices. It enables the deployment of machine learning models on resource-constrained platforms.
The vulnerability can lead to data corruption, crashes, or even arbitrary code execution. Attackers can exploit this flaw to manipulate tensor dimensions and cause out-of-bounds reads and writes.
To fix this vulnerability, it is recommended to upgrade to TensorFlow versions 1.15.4, 2.0.3, 2.1.2, 2.2.1, or 2.3.1. Run the command pip install --upgrade tensorflow to update your TensorFlow installation.
A temporary workaround is to use debug compilation modes during development and testing to activate the DCHECK statement and detect potential dimension size discrepancies. However, this is not a substitute for applying the official patch and upgrading to the latest secure version of TensorFlow Lite.
This vulnerability was reported by members of the Aivul Team from Qihoo 360.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.