CVE-2020-15210: Segmentation fault in tensorflow-lite
Summary
CVE-2020-15210: Segmentation fault 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-15210 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 used for various tasks such as image recognition, natural language processing, and more. It provides a comprehensive ecosystem of tools, libraries, and resources for developing 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, a vulnerability has been discovered in TensorFlow Lite that can lead to a segmentation fault or memory corruption.
Vulnerability Detail
The vulnerability arises when a TFLite saved model uses the same tensor as both input and output of an operator. Depending on the specific operator, this can result in a segmentation fault or memory corruption. The issue has been patched in versions 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 2.3.1 of TensorFlow. Users are advised to upgrade to one of these versions to mitigate the vulnerability. A potential workaround is to add a custom Verifier to the model loading code to ensure that no operator reuses tensors as both inputs and outputs. Care should be taken to check all types of inputs, including constant or variable tensors as well as optional tensors.
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
A potential workaround for this vulnerability is to add a custom Verifier to the model loading code. This Verifier should check that no operator reuses tensors as both inputs and outputs. Here is an example of how to implement this workaround in Python:
import tensorflow as tf
class CustomVerifier(tf.lite.Interpreter):
def __init__(self, model_path):
super().__init__(model_path)
self.verify()
def verify(self):
# Add your verification logic here
pass
model_path = 'path/to/model.tflite'
interpreter = CustomVerifier(model_path)
interpreter.allocate_tensors()
By implementing a custom Verifier class and calling its verify method during model loading, you can ensure that the vulnerability is mitigated.
Conclusion
In conclusion, the vulnerability in TensorFlow Lite can lead to a segmentation fault or memory corruption. It is important to upgrade to the patched versions of TensorFlow and follow the recommended steps to fix the vulnerability. Adding a custom Verifier can also serve as a workaround. For further support on vulnerability remediation, you can reach out to DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
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.
The vulnerability can lead to a segmentation fault or memory corruption in TensorFlow Lite. This can potentially cause crashes, data corruption, or even remote code execution.
To fix the vulnerability, you should upgrade to TensorFlow 1.15.4, 2.0.3, 2.1.2, 2.2.1, or 2.3.1. Make sure to update the TensorFlow package in your project's dependencies and retest your application.
Yes, a potential workaround is to add a custom Verifier to the model loading code. This Verifier should check that no operator reuses tensors as both inputs and outputs.
You can find more information about this vulnerability in the TensorFlow security guide. It provides details on the security model and how to contact the TensorFlow team with any issues or questions.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.