CVE-2021-29613: TensorFlow GPU - Incomplete Validation in tf.raw_ops.CTCLoss

tensorflow-gpu Updated 02 Oct 2025

Summary

14/05/2021
Yes i
Unrated
Not published

CVE-2021-29613: TensorFlow is an end-to-end open source platform for machine learning. Affects tensorflow-gpu across 6 version ranges.

< 2.1.4 >= 2.2.0, < 2.2.3 >= 2.3.0, < 2.3.3 >= 2.4.0, < 2.4.2 < 4504a081af71514bb1828048363e6540f797005b < 14607c0707040d775e06b6817325640cb4b5864c

Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓

Also tracked for

The same CVE-2021-29613 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

TensorFlow is an end-to-end open source platform for machine learning. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning models. TensorFlow GPU is a specific package that enables GPU support for TensorFlow. It allows users to leverage the power of GPUs for accelerated machine learning computations. However, the package is vulnerable to an incomplete validation issue in the tf.raw_ops.CTCLoss function.

Vulnerability Detail

The vulnerability in TensorFlow GPU arises from incomplete validation in the tf.raw_ops.CTCLoss function. This flaw can be exploited by an attacker to trigger an out-of-bounds read from the heap. By crafting a malicious input, an attacker can cause the program to read data beyond the allocated memory, potentially leading to information disclosure or a crash. The impact of this vulnerability depends on the context in which TensorFlow GPU is used. If the affected function is utilized in a critical part of a machine learning pipeline, the vulnerability could be leveraged to compromise the integrity or confidentiality of the system.

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.1.4 2.1.4
    pip install --upgrade "tensorflow-gpu==2.1.4"
  • >= 2.2.0, < 2.2.3 2.2.3
    pip install --upgrade "tensorflow-gpu==2.2.3"
  • >= 2.3.0, < 2.3.3 2.3.3
    pip install --upgrade "tensorflow-gpu==2.3.3"
  • >= 2.4.0, < 2.4.2 2.4.2
    pip install --upgrade "tensorflow-gpu==2.4.2"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a workaround, you can temporarily avoid using the tf.raw_ops.CTCLoss function in your code until the vulnerability is patched. Alternatively, you can implement input validation and bounds checking in your own code to mitigate the risk of out-of-bounds reads.

Conclusion

The vulnerability in TensorFlow GPU's tf.raw_ops.CTCLoss function can be mitigated by updating to the latest version or applying the relevant patch. It is crucial to keep your software dependencies up to date to ensure the security and integrity of your machine learning pipelines. If you need further assistance or support in addressing this vulnerability, please reach out to DevNack.com.

See every vulnerability recorded for tensorflow-gpu →

Share this vulnerability

FAQ

TensorFlow GPU is a package that provides GPU support for TensorFlow, enabling accelerated machine learning computations using GPUs.

The impact of this vulnerability depends on the context in which TensorFlow GPU is used. If the affected function is utilized in a critical part of a machine learning pipeline, the vulnerability could be leveraged to compromise the integrity or confidentiality of the system.

To fix this vulnerability, update TensorFlow GPU to version 2.5.0 or apply the relevant patch to earlier versions (2.4.2, 2.3.3, 2.2.3, or 2.1.4).

As a temporary workaround, you can avoid using the tf.raw_ops.CTCLoss function or implement input validation and bounds checking in your code.

Yes, the incomplete validation in tf.raw_ops.CTCLoss can potentially lead to information disclosure if exploited by an attacker.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow-gpu.

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.1.4 2.1.4
    pip install --upgrade "tensorflow-gpu==2.1.4"
  • >= 2.2.0, < 2.2.3 2.2.3
    pip install --upgrade "tensorflow-gpu==2.2.3"
  • >= 2.3.0, < 2.3.3 2.3.3
    pip install --upgrade "tensorflow-gpu==2.3.3"
  • >= 2.4.0, < 2.4.2 2.4.2
    pip install --upgrade "tensorflow-gpu==2.4.2"

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