CVE-2020-15209: Null Pointer Dereference in TensorFlow-Lite
Summary
CVE-2020-15209: Null pointer dereference 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-15209 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 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, a vulnerability has been discovered in TensorFlow-Lite that can lead to a null pointer dereference.
Vulnerability Detail
The vulnerability in TensorFlow-Lite arises from a flaw in the handling of TFLite models. By manipulating the buffer index in the flatbuffer serialization of a model, an attacker can convert a read-only tensor to a read-write one. The runtime assumes that these buffers are initialized with a null pointer, but by changing the buffer index, the tensor becomes a read-write one without any initialization. This can result in a null pointer dereference when the tensor is accessed. An attacker can exploit this vulnerability by crafting a malicious TFLite model. The impact of this vulnerability can vary depending on the context in which TensorFlow-Lite is used, but it has the potential to lead to crashes or other unexpected behavior.
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
There is no specific workaround provided for this vulnerability. The recommended solution is to upgrade to the patched versions of TensorFlow as mentioned above.
Conclusion
The vulnerability in TensorFlow-Lite can be mitigated by upgrading to the patched versions of TensorFlow. It is important for users to promptly update their installations to ensure the security and stability of their machine learning applications. For further support and assistance with vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow →
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.
An attacker can exploit this vulnerability by crafting a malicious TFLite model that manipulates the buffer index in the flatbuffer serialization, converting a read-only tensor to a read-write one and causing a null pointer dereference when the tensor is accessed.
The impact of this vulnerability can vary depending on the context in which TensorFlow-Lite is used. It has the potential to lead to crashes or other unexpected behavior, which could be exploited by an attacker to disrupt the functioning of an application or gain unauthorized access.
There are no known instances of this vulnerability being exploited in the wild. However, it is important to apply the patch as soon as possible to mitigate the risk.
You can update your TensorFlow installation by using the package manager or by manually downloading and installing the patched version from the TensorFlow website.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.