CVE-2021-29613: TensorFlow CTCLoss Incomplete Validation OOB Read Vulnerability

tensorflow-cpu 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-cpu 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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

TensorFlow is an end-to-end open source platform for machine learning. It provides a comprehensive ecosystem of tools, libraries, and resources for developing and deploying machine learning models. TensorFlow is widely used in various domains, including research, industry, and academia. The CTCLoss function in TensorFlow is responsible for computing the Connectionist Temporal Classification (CTC) loss, which is commonly used in sequence-to-sequence models for tasks like speech recognition and handwriting recognition. This vulnerability affects the TensorFlow package, specifically the CTCLoss function.

Vulnerability Detail

The vulnerability (CVE-2021-29613) arises from incomplete validation in the CTCLoss function of TensorFlow. It allows an attacker to trigger an out-of-bounds read from the heap. This can lead to information disclosure or potential crashes in applications that utilize TensorFlow's CTCLoss function. The vulnerability has been identified and fixed by the TensorFlow development team. The fix will be included in TensorFlow 2.5.0, and patches have also been backported to earlier versions (2.4.2, 2.3.3, 2.2.3, and 2.1.4) that are still within the supported range.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

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

There is no specific workaround provided for this vulnerability. The recommended approach is to update the TensorFlow package to the fixed version or apply the available patches.

Conclusion

The TensorFlow CTCLoss Incomplete Validation OOB Read Vulnerability (CVE-2021-29613) has been identified and fixed by the TensorFlow development team. It is crucial to update the TensorFlow package to version 2.5.0 or apply the provided patches to mitigate the risk of out-of-bounds reads from the heap. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow-cpu →

Share this vulnerability

FAQ

TensorFlow is an open source platform for machine learning, providing tools and libraries for developing and deploying machine learning models.

CTCLoss is a function in TensorFlow used for computing the Connectionist Temporal Classification (CTC) loss, commonly used in sequence-to-sequence models.

The vulnerability allows an attacker to trigger an out-of-bounds read from the heap, potentially leading to information disclosure or application crashes.

The vulnerability affects TensorFlow versions 2.1.4, 2.2.3, 2.3.3, 2.4.2, and prior versions within the supported range.

To fix this vulnerability, update the TensorFlow package to version 2.5.0 or apply the relevant patches for the affected versions.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow-cpu.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

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