CVE-2021-29613: TensorFlow GPU - Incomplete Validation in tf.raw_ops.CTCLoss
Summary
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
- tensorflow · Bitnami
- tensorflow · PyPI
- tensorflow · PyPI
- tensorflow-cpu · PyPI
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.
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 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.42.1.4pip install --upgrade "tensorflow-gpu==2.1.4" -
>= 2.2.0, < 2.2.32.2.3pip install --upgrade "tensorflow-gpu==2.2.3" -
>= 2.3.0, < 2.3.32.3.3pip install --upgrade "tensorflow-gpu==2.3.3" -
>= 2.4.0, < 2.4.22.4.2pip 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 →
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.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.