CVE-2022-36013: TensorFlow Null-Dereference Vulnerability in GraphDefImporter
Summary
CVE-2022-36013: TensorFlow vulnerable to null-dereference in mlir::tfg::GraphDefImporter::ConvertNodeDef. 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-36013 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 flexible architecture that allows deployment across various platforms. However, TensorFlow has a vulnerability in its GraphDefImporter component, which can lead to application crashes when processing NodeDefs without an operation name.
Vulnerability Detail
The vulnerability arises in the function mlir::tfg::GraphDefImporter::ConvertNodeDef, where the absence of an operation name in NodeDefs can cause a null-dereference, leading to a crash. This issue can disrupt the normal functioning of applications relying on TensorFlow for machine learning tasks, potentially resulting in data loss or service downtime. The specific code segment that triggers this vulnerability checks for the operation name and fails to handle cases where it is empty, leading to an invalid argument error.
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 mentioned for this vulnerability. However, ensuring that NodeDefs always include valid operation names can help mitigate the risk of encountering this issue.
Conclusion
CVE-2022-36013 is a significant vulnerability in TensorFlow that can lead to application crashes due to null-dereference errors when processing NodeDefs without operation names. Users are advised to update to the latest patched versions to mitigate this risk and ensure the stability of their applications.
See every vulnerability recorded for tensorflow →
FAQ
CVE-2022-36013 is a vulnerability in TensorFlow that can cause a null-dereference crash when processing NodeDefs without an operation name.
Users may experience application crashes or unexpected behavior when TensorFlow attempts to process invalid NodeDefs, potentially leading to data loss or service interruptions.
TensorFlow versions prior to 2.10.0, as well as 2.9.0, 2.8.0, and 2.7.0, are affected by this vulnerability.
You can use Vulert, a tool that monitors and alerts for open-source vulnerabilities in your software. Check your application's vulnerability status using the Vulert playground at Vulert Scanner without needing to sign up.
The CVSS score for CVE-2022-36013 is 5.9, indicating a moderate severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.