CVE-2022-29193: TensorFlow - Missing validation causes `TensorSummaryV2` to crash
Summary
CVE-2022-29193: Missing validation causes TensorSummaryV2 to crash. 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-29193 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 developed by Google. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning models. TensorFlow allows users to define and train deep learning models using a high-level API. It is widely used in various domains, including computer vision, natural language processing, and reinforcement learning. However, a vulnerability has been identified in TensorFlow that can lead to a denial of service attack.
Vulnerability Detail
The vulnerability, identified as CVE-2022-29193, exists in the implementation of tf.raw_ops.TensorSummaryV2 in TensorFlow. This function does not perform proper validation of input arguments, specifically the axis parameter. As a result, an attacker can exploit this vulnerability to trigger a CHECK-failure, causing the program to crash. By repeatedly exploiting this vulnerability, an attacker can launch a denial of service attack, disrupting the availability of the affected TensorFlow application.
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
If immediate updating is not possible, users can implement a workaround to mitigate the vulnerability. One possible workaround is to add explicit validation for the axis parameter before calling the tf.raw_ops.TensorSummaryV2 function. Here is an example of how this can be done in Python:
import numpy as np
import tensorflow as tf
def safe_tensor_summary(tag, tensor):
if isinstance(axis, int):
tf.raw_ops.TensorSummaryV2(tag=np.array(tag), tensor=np.array(tensor), serialized_summary_metadata=tf.io.encode_base64(np.empty((0))))
else:
# Handle the error condition appropriately
pass
Conclusion
The vulnerability in TensorFlow's TensorSummaryV2 function can be exploited to crash the affected application, leading to a denial of service attack. To mitigate this vulnerability, users should update their TensorFlow installation to one of the patched versions: TensorFlow 2.6.4, TensorFlow 2.7.2, TensorFlow 2.8.1, or TensorFlow 2.9.0 (upcoming release). If immediate updating is not possible, implementing the provided workaround can help mitigate the risk. For further assistance or reporting of other vulnerabilities, contact the TensorFlow development team at DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
The vulnerability allows an attacker to trigger a denial of service attack by crashing the affected TensorFlow application. This can lead to a temporary or permanent disruption of the application's availability.
You can use the Vulert Playground at Vulert Scanner to check if your TensorFlow installation is affected by this vulnerability. Simply provide your Pipfile.lock file, and Vulert will analyze it and alert you if any open-source vulnerabilities, including this one, are found.
No, not all versions of TensorFlow are affected. The vulnerability exists in TensorFlow versions 2.6.4, 2.7.2, 2.8.1, and earlier. It has been fixed in TensorFlow 2.6.4, 2.7.2, 2.8.1, and will also be addressed in the upcoming TensorFlow 2.9.0 release.
There are no known public exploits of this vulnerability at the time of this advisory. However, it is important to promptly update your TensorFlow installation to the patched versions to prevent potential exploitation.
If you have discovered other vulnerabilities in TensorFlow or need further assistance, you can contact the TensorFlow development team at info@devnack.com. They will provide guidance and support for vulnerability remediation.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.