CVE-2022-23561: Out of Bounds Write in TFLite
Summary
CVE-2022-23561: Out of bounds write in TFLite. Affects tensorflow across 3 version ranges.
< 2.5.3
>= 2.6.0, < 2.6.3
>= 2.7.0, < 2.7.1
Fixed in 2.5.3, 2.6.3 or 2.7.1, depending on the release line you run. How to fix ↓
Also tracked for
- tensorflow · Bitnami
- tensorflow-gpu · PyPI
- tensorflow-cpu · PyPI
The same CVE-2022-23561 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
The TensorFlow Lite (TFLite) package 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, embedded systems, and microcontrollers. TFLite provides a lightweight runtime that enables efficient execution of TensorFlow models. However, a vulnerability has been discovered in TFLite that allows an attacker to craft a malicious model, leading to an out-of-bounds write in the TFLite library. This vulnerability can be exploited to override the linked list used by the memory allocator, potentially resulting in arbitrary write operations under certain conditions.
Vulnerability Detail
The vulnerability in TFLite arises from a flaw in the handling of TFLite models. By crafting a malicious model, an attacker can trigger an out-of-bounds write operation in the TFLite library. This can be used to overwrite critical data structures, including the linked list used by the memory allocator. The impact of this vulnerability is significant, as it can provide an attacker with an arbitrary write primitive, allowing them to manipulate memory and potentially execute arbitrary code. The vulnerability has been assigned a CVSS score of 8.8, indicating a high severity level.
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.
-
< 2.5.32.5.3pip install --upgrade "tensorflow==2.5.3" -
>= 2.6.0, < 2.6.32.6.3pip install --upgrade "tensorflow==2.6.3" -
>= 2.7.0, < 2.7.12.7.1pip install --upgrade "tensorflow==2.7.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 known workaround for this vulnerability. It is recommended to apply the available patches as soon as possible.
Conclusion
The vulnerability in TensorFlow Lite (TFLite) allows an attacker to trigger an out-of-bounds write operation, potentially leading to arbitrary write operations and execution of arbitrary code. To mitigate this vulnerability, it is crucial to update to the latest patched version of TensorFlow (2.8.0) once it is released. Alternatively, users can update to one of the backported patches for TensorFlow versions 2.7.1, 2.6.3, or 2.5.3. For further support and assistance with vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
TensorFlow Lite (TFLite) 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, embedded systems, and microcontrollers.
The vulnerability allows an attacker to craft a malicious TFLite model that triggers an out-of-bounds write operation. This can lead to arbitrary write operations and potential execution of arbitrary code, posing a significant security risk.
To fix the vulnerability, it is recommended to update to the latest patched version of TensorFlow (2.8.0) once it is released. Alternatively, you can update to one of the backported patches for TensorFlow versions 2.7.1, 2.6.3, or 2.5.3.
No, there is no known workaround for this vulnerability. It is crucial to apply the available patches to mitigate the risk.
This vulnerability was reported by Wang Xuan of Qihoo 360 AIVul Team.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.