CVE-2022-36012: TensorFlow GPU Assertion Fail on MLIR Empty Edge Names
Summary
CVE-2022-36012: TensorFlow vulnerable to assertion fail on MLIR empty edge names. Affects tensorflow-gpu 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 · PyPI
- tensorflow-cpu · PyPI
- tensorflow · Bitnami
- tensorflow · PyPI
The same CVE-2022-36012 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 framework that provides a comprehensive ecosystem for building and deploying machine learning models. It supports various operations, including neural network training and inference. TensorFlow GPU is a variant optimized for GPU acceleration, enhancing performance for computationally intensive tasks. However, it is susceptible to vulnerabilities that can lead to crashes or unexpected behavior, particularly when handling malformed input.
Vulnerability Detail
The vulnerability arises in the function 'mlir::tfg::ConvertGenericFunctionToFunctionDef' when it receives empty function attributes. This can lead to an assertion failure, causing the application to crash. Specifically, the code attempts to process return values and inputs without validating their presence, which can result in invalid arguments being passed. The lack of checks for empty values in critical sections of the code makes it vulnerable to crashes, impacting the stability of applications relying on TensorFlow.
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.7.22.7.2pip install --upgrade "tensorflow-gpu==2.7.2" -
>= 2.8.0, < 2.8.12.8.1pip install --upgrade "tensorflow-gpu==2.8.1" -
>= 2.9.0, < 2.9.12.9.1pip install --upgrade "tensorflow-gpu==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 mentioned for this vulnerability. It is recommended to update to the patched version as soon as possible to avoid potential crashes.
Conclusion
CVE-2022-36012 is a significant vulnerability in TensorFlow GPU that can lead to application crashes due to assertion failures when handling empty function attributes. Users are strongly advised to update to the latest patched versions to ensure stability and security in their applications.
See every vulnerability recorded for tensorflow-gpu →
FAQ
CVE-2022-36012 is a vulnerability in TensorFlow GPU that can cause assertion failures when empty function attributes are processed.
Users may experience crashes or instability in their applications when using TensorFlow GPU with malformed inputs that trigger this vulnerability.
Affected versions include TensorFlow GPU versions prior to 2.7.2, 2.8.1, and 2.9.1.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit the Vulert playground at Vulert Scanner to check if your application is affected without any signup.
The CVSS score of this vulnerability is 5.9, indicating a moderate level of risk.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.