CVE-2022-35970: TensorFlow Segfault Vulnerability in QuantizedInstanceNorm
Summary
CVE-2022-35970: TensorFlow vulnerable to segfault in QuantizedInstanceNorm. Affects tensorflow across 3 version ranges.
< 2.7.2
>= 2.8.0, < 2.8.1
>= 2.9.0, < 2.9.1
Fixed in 2.7.2, 2.8.1 or 2.9.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-35970 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 developed by Google, widely used for building and training machine learning models. It provides a comprehensive ecosystem for deep learning and offers various tools and libraries for developers. The library is known for its flexibility and scalability, enabling users to deploy machine learning models across different platforms. However, TensorFlow has been found to have a vulnerability in the QuantizedInstanceNorm operation, which can lead to a segmentation fault under specific conditions.
Vulnerability Detail
The vulnerability arises when the QuantizedInstanceNorm function is provided with x_min or x_max tensors that have a nonzero rank. This can lead to a segmentation fault, which can be exploited to trigger a denial of service attack. The issue is particularly concerning as it can cause applications using TensorFlow to crash unexpectedly, leading to potential service disruptions.
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.7.22.7.2pip install --upgrade "tensorflow==2.7.2" -
>= 2.8.0, < 2.8.12.8.1pip install --upgrade "tensorflow==2.8.1" -
>= 2.9.0, < 2.9.12.9.1pip install --upgrade "tensorflow==2.9.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 provided for this vulnerability. It is recommended to avoid using the QuantizedInstanceNorm function with nonzero rank tensors for x_min or x_max until the package is updated.
Conclusion
The CVE-2022-35970 vulnerability in TensorFlow's QuantizedInstanceNorm function poses a significant risk by potentially allowing denial of service attacks through segmentation faults. Users are advised to update to the latest patched versions of TensorFlow to mitigate this risk.
See every vulnerability recorded for tensorflow →
FAQ
CVE-2022-35970 is a vulnerability in TensorFlow that can lead to a segmentation fault when using the QuantizedInstanceNorm function with improperly shaped tensors.
Exploiting this vulnerability can cause your application to crash, leading to service disruptions and denial of service attacks.
The vulnerability affects TensorFlow versions prior to 2.10.0, including 2.9.0, 2.8.0, and 2.7.0.
You can use Vulert to monitor and alert in real-time for open-source vulnerabilities in your software. You can check if your application is affected by this vulnerability using the Vulert playground without any signup.
The CVSS score for this vulnerability is 5.9, indicating a moderate severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.