CVE-2020-15214: TensorFlow Lite Segment Sum Write Out-of-Bounds Vulnerability
Summary
CVE-2020-15214: In TensorFlow Lite before versions 2.2.1 and 2.3.1, models using segment sum can trigger a write out bounds / segmentation fault if the segment ids are not sorted. Affects tensorflow-gpu across 3 version ranges.
>= 2.2.0, < 2.2.1
>= 2.3.0, < 2.3.1
< 204945b19e44b57906c9344c0d00120eeeae178a
Fixed in 2.2.1 or 2.3.1, depending on the release line you run. How to fix ↓
Also tracked for
- tensorflow · Bitnami
- tensorflow · PyPI
- tensorflow-cpu · PyPI
- tensorflow · PyPI
The same CVE-2020-15214 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 machine learning framework designed for mobile and embedded devices. It allows developers to deploy machine learning models on resource-constrained platforms. TensorFlow Lite includes various operations, including segment sum, which aggregates values based on segment IDs. This vulnerability affects TensorFlow Lite versions before 2.2.1 and 2.3.1.
Vulnerability Detail
The vulnerability in TensorFlow Lite arises when models using segment sum have unsorted segment IDs. The code assumes that the segment IDs are in increasing order, using the last element of the tensor holding them to determine the dimensionality of the output tensor. This leads to insufficient memory allocation for the output tensor and results in a write outside the bounds of the output array. In most cases, this triggers a segmentation fault, but under certain runtime conditions, it can be exploited for future memory corruption-based attacks.
How To Fix
Latest published version: 2.12.0 as of 22 Oct 2026
pip install --upgrade "tensorflow-gpu==2.12.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.
-
>= 2.2.0, < 2.2.12.2.1pip install --upgrade "tensorflow-gpu==2.2.1" -
>= 2.3.0, < 2.3.12.3.1pip install --upgrade "tensorflow-gpu==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 is to add a custom Verifier to the model loading code to ensure that the segment IDs are sorted. However, this workaround only applies when the segment IDs are stored statically in the model. If the segment IDs are generated at runtime between inference steps, there is no possible workaround, and upgrading to the patched code is recommended.
Conclusion
The TensorFlow Lite Segment Sum Write Out-of-Bounds Vulnerability (CVE-2020-15214) affects versions before 2.2.1 and 2.3.1 of TensorFlow Lite. It can result in a write outside the bounds of the output array, leading to a segmentation fault or potential memory corruption-based exploits. Users are advised to upgrade to the patched code or apply the suggested workaround. For further support on vulnerability remediation, contact DevNack.com.
See every vulnerability recorded for tensorflow-gpu →
FAQ
TensorFlow Lite is an open-source machine learning framework designed for mobile and embedded devices. It enables the deployment of machine learning models on resource-constrained platforms.
Versions before 2.2.1 and 2.3.1 of TensorFlow Lite are affected by this vulnerability.
The vulnerability can lead to a write outside the bounds of the output array, resulting in a segmentation fault or potential memory corruption-based exploits.
Upgrade to TensorFlow versions 2.2.1 or 2.3.1, which include the patch for this vulnerability.
A potential workaround is to add a custom Verifier to ensure sorted segment IDs, but it only applies when the segment IDs are stored statically in the model. If the segment IDs are generated at runtime, upgrading to the patched code is recommended.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.