CVE-2022-29193: TensorFlow - Missing validation causes `TensorSummaryV2` to crash

tensorflow Updated 02 Oct 2025

Summary

24/05/2022
Yes i
Moderate
5.5

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

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.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

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.4 2.6.4
    pip install --upgrade "tensorflow==2.6.4"
  • >= 2.7.0, < 2.7.2 2.7.2
    pip install --upgrade "tensorflow==2.7.2"
  • >= 2.8.0, < 2.8.1 2.8.1
    pip 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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

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.4 2.6.4
    pip install --upgrade "tensorflow==2.6.4"
  • >= 2.7.0, < 2.7.2 2.7.2
    pip install --upgrade "tensorflow==2.7.2"
  • >= 2.8.0, < 2.8.1 2.8.1
    pip 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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback