CVE-2020-15211: TensorFlow Lite Flatbuffer Model Double Indexing Vulnerability
Summary
CVE-2020-15211: In TensorFlow Lite before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, saved models in the flatbuffer format use a double indexing scheme: a model has a set of subgraphs, each subgraph has a set of operators and each... Affects tensorflow across 11 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
< 46d5b0852528ddfd614ded79bccc75589f801bd9
< 1970c2158b1ffa416d159d03c3370b9a462aee35
< 00302787b788c5ff04cb6f62aed5a74d936e86c0
< cd31fd0ce0449a9e0f83dcad08d6ed7f1d6bef3f
< e11f55585f614645b360563072ffeb5c3eeff162
< fff2c8326280c07733828f990548979bdc893859
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-15211 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 Lite is an open-source deep learning framework developed by Google. It is designed to run machine learning models on resource-constrained devices such as mobile phones and embedded systems. TensorFlow Lite models are saved in the flatbuffer format, which uses a double indexing scheme to represent subgraphs, operators, and input/output tensors. This vulnerability affects versions of TensorFlow Lite prior to 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 2.3.1.
Vulnerability Detail
The vulnerability in TensorFlow Lite arises from the use of a negative -1 value as an index for optional tensors in the flatbuffer model. This index is considered valid for all operators, including those that do not expect optional inputs or outputs. As a result, it allows for reading and writing outside the bounds of heap allocated arrays, albeit at a specific offset. While this vulnerability has limited scope, it can be exploited to execute both read and write gadgets. The issue has been patched in TensorFlow versions 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 2.3.1.
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 custom verifier should ensure that only operators that accept optional inputs use the -1 special value, and only for the tensors they expect to be optional. However, this approach is error-prone, and it is strongly advised to upgrade to the patched code instead.
Conclusion
The TensorFlow Lite Flatbuffer Model Double Indexing Vulnerability (CVE-2020-15211) allows for reading and writing outside the bounds of heap allocated arrays in TensorFlow Lite models. While the scope of the vulnerability is limited, it is recommended to upgrade to the patched versions of TensorFlow Lite to ensure the security of your applications. For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
TensorFlow Lite is an open-source deep learning framework developed by Google. It is designed to run machine learning models on resource-constrained devices such as mobile phones and embedded systems.
This vulnerability allows for reading and writing outside the bounds of heap allocated arrays in TensorFlow Lite models. However, the scope of the vulnerability is limited, and it requires specific conditions to be exploited.
To fix this vulnerability, it is recommended to upgrade to the patched versions of TensorFlow Lite (1.15.4, 2.0.3, 2.1.2, 2.2.1, or 2.3.1).
A potential workaround is to add a custom Verifier to the model loading code. However, this approach is error-prone, and it is strongly advised to upgrade to the patched code instead.
You can find more information about this vulnerability in the TensorFlow advisory database: [link to the advisory]
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.