CVE-2022-29212: TensorFlow Core Dump Vulnerability in TFLite Model Loading
Summary
CVE-2022-29212: Core dump when loading TFLite models with quantization in TensorFlow. Affects tensorflow across 3 version ranges.
< 2.6.4
>= 2.7.0, < 2.7.2
>= 2.8.0, < 2.8.1
Fixed in 2.6.4, 2.7.2 or 2.8.1, depending on the release line you run. How to fix ↓
Also tracked for
- tensorflow-cpu · PyPI
- tensorflow-gpu · PyPI
- tensorflow · Bitnami
The same CVE-2022-29212 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 library widely used for various applications, including deep learning and neural networks. It provides tools for building and training models, as well as deploying them in production. The library supports TensorFlow Lite (TFLite), which is designed for mobile and edge devices. However, certain TFLite models created using the TFLite model converter can crash when loaded in the TFLite interpreter due to a quantization issue, making it vulnerable to this specific problem.
Vulnerability Detail
The vulnerability arises when certain TFLite models are loaded into the interpreter, leading to a core dump. This issue occurs because the quantization process can result in scale values greater than 1, while the code assumes sub-unit scaling. Consequently, the function 'QuantizeMultiplierSmallerThanOneExp' triggers a 'TFLITE_CHECK_LT' assertion, causing the interpreter to abort. This can lead to application crashes and potential denial of service.
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.6.42.6.4pip install --upgrade "tensorflow==2.6.4" -
>= 2.7.0, < 2.7.22.7.2pip install --upgrade "tensorflow==2.7.2" -
>= 2.8.0, < 2.8.12.8.1pip install --upgrade "tensorflow==2.8.1"
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
Currently, there are no specific workarounds mentioned for this vulnerability. It is recommended to update to the patched version as soon as possible to mitigate the risk.
Conclusion
The CVE-2022-29212 vulnerability in TensorFlow can lead to core dumps when loading certain TFLite models. It is essential to update to the patched versions of TensorFlow to mitigate this risk. Users should also consider using tools like Vulert to monitor for vulnerabilities in their applications.
See every vulnerability recorded for tensorflow →
FAQ
CVE-2022-29212 is a vulnerability in TensorFlow that causes a core dump when loading certain TFLite models due to an issue with quantization.
If your application uses TFLite models created with the affected TensorFlow versions, it may crash when attempting to load these models, leading to potential service disruptions.
The vulnerability affects TensorFlow versions prior to 2.6.4, 2.7.2, 2.8.1, and 2.9.0. It is crucial to update to one of the patched versions.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Visit the Vulert playground at Vulert Scanner to check if your application is affected without needing to sign up.
The CVSS score for this vulnerability is 5.5, indicating a moderate level of severity.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.