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

tensorflow Updated 02 Oct 2025

Summary

06/03/2024
Yes i
High
Not published

CVE-2021-29613: Incomplete validation in tf.raw_ops.CTCLoss. Affects tensorflow across 4 version ranges.

< 2.1.4 >= 2.2.0, < 2.2.3 >= 2.3.0, < 2.3.3 >= 2.4.0, < 2.4.2

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 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 end-to-end open source platform for machine learning. It provides a comprehensive ecosystem for developing and deploying machine learning models. TensorFlow is widely used in various industries and research domains due to its flexibility and scalability. However, a vulnerability has been discovered in the tf.raw_ops.CTCLoss function, which can be exploited to trigger an out-of-bounds read from the heap.

Vulnerability Detail

The vulnerability arises from incomplete validation in the tf.raw_ops.CTCLoss function. An attacker can exploit this vulnerability to read data from memory locations outside the bounds of the allocated heap. This can lead to the disclosure of sensitive information or the execution of arbitrary code. The impact of this vulnerability can be severe, as it allows an attacker to bypass security measures and gain unauthorized access to sensitive data or compromise the integrity of the system.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 2.1.4 2.1.4
  • >= 2.2.0, < 2.2.3 2.2.3
  • >= 2.3.0, < 2.3.3 2.3.3
  • >= 2.4.0, < 2.4.2 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 temporary workaround, you can consider disabling or restricting access to the tf.raw_ops.CTCLoss function in your TensorFlow application. This can be achieved by modifying the code or configuration to avoid using this specific function. However, this workaround may impact the functionality or performance of your application, so it is recommended to apply the official fix as soon as possible.

Conclusion

The vulnerability in TensorFlow's tf.raw_ops.CTCLoss function can lead to an out-of-bounds read from the heap, potentially resulting in the disclosure of sensitive information or the execution of arbitrary code. It is crucial to upgrade to the latest patched version of TensorFlow or apply the official fix as soon as it becomes available. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

TensorFlow is an open source platform for machine learning that provides a comprehensive ecosystem for developing and deploying machine learning models.

This vulnerability allows an attacker to trigger an out-of-bounds read from the heap, potentially leading to the disclosure of sensitive information or the execution of arbitrary code.

The vulnerability affects TensorFlow versions 2.1.4, 2.2.3, 2.3.3, and 2.4.2. The upcoming TensorFlow 2.5.0 release will include the fix for this vulnerability.

To fix this vulnerability, it is recommended to upgrade to the latest patched version of TensorFlow as soon as it becomes available. The fix will be included in TensorFlow 2.5.0, and backported to versions 2.4.2, 2.3.3, 2.2.3, and 2.1.4.

As a temporary workaround, you can consider disabling or restricting access to the tf.raw_ops.CTCLoss function in your TensorFlow application. However, it is recommended to apply the official fix as soon as possible.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 2.1.4 2.1.4
  • >= 2.2.0, < 2.2.3 2.2.3
  • >= 2.3.0, < 2.3.3 2.3.3
  • >= 2.4.0, < 2.4.2 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