CVE-2022-23573: TensorFlow Uninitialized Variable Access Vulnerability
Summary
CVE-2022-23573: Uninitialized variable access in Tensorflow. 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-23573 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. It is widely used for building and training machine learning models due to its flexibility and scalability. TensorFlow provides a comprehensive ecosystem for deep learning and offers tools for both research and production. However, it is crucial to maintain the integrity of the data being processed, as vulnerabilities can lead to undefined behavior and potential security risks.
Vulnerability Detail
The vulnerability arises from the implementation of the AssignOp in TensorFlow, which can lead to copying uninitialized data to a new tensor. This oversight occurs because the left-hand side of the assignment is checked for initialization, but the right-hand side is not. As a result, this can lead to undefined behavior in applications using TensorFlow, potentially compromising the integrity of machine learning models and their outputs.
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
Currently, there are no specific workarounds mentioned for this vulnerability. The best course of action is to update to the patched versions of TensorFlow as indicated.
Conclusion
The CVE-2022-23573 vulnerability in TensorFlow highlights the importance of ensuring that both sides of variable assignments are initialized to prevent undefined behavior. Users are encouraged to update to the latest patched versions to mitigate risks associated with this vulnerability.
See every vulnerability recorded for tensorflow →
FAQ
CVE-2022-23573 is a vulnerability in TensorFlow that allows for uninitialized variable access, potentially leading to undefined behavior.
This vulnerability can lead to copying uninitialized data, which may compromise the integrity of your machine learning models and their predictions.
The vulnerability affects TensorFlow versions prior to 2.5.3, 2.6.3, and 2.7.1.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without needing to sign up.
The CVSS score for this vulnerability is 7.6, indicating a high severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.