CVE-2021-29560
Python vulnerability analysis and mitigation

Overview

TensorFlow, an end-to-end open source platform for machine learning, was found to contain a heap buffer overflow vulnerability (CVE-2021-29560) in the tf.raw_ops.RaggedTensorToTensor operation. The vulnerability was discovered by Ying Wang and Yakun Zhang of Baidu X-Team and affects TensorFlow versions prior to 2.5.0. The issue was patched in versions 2.1.4, 2.2.3, 2.3.3, and 2.4.2 (GitHub Advisory).

Technical details

The vulnerability occurs because the implementation uses the same index to access two arrays in parallel. The issue is located in the code where a loop iterates through row splits: for (INDEX_TYPE i = 0; i < row_split_size - 1; ++i). Since the user controls the shape of the input arguments, an attacker could trigger a heap out-of-bounds access when parent_output_index is shorter than row_split. The vulnerability has been assigned a CVSS v3.1 base score of 7.1 (HIGH) by NVD and 2.5 (LOW) by GitHub (NVD).

Impact

The vulnerability allows an attacker to cause a heap buffer overflow, which could potentially lead to memory corruption and unauthorized access to heap-allocated data. This could result in system crashes or potential arbitrary code execution (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in GitHub commit a84358aa12f0b1518e606095ab9cfddbf597c121. Users are advised to upgrade to TensorFlow version 2.5.0 or apply the following patched versions: TensorFlow 2.4.2, 2.3.3, 2.2.3, or 2.1.4. The fix implements additional validation to check if the row partition size is greater than the output size (GitHub Commit).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66423HIGH7.1
  • PythonPython
  • tryton-server
NoYesNov 30, 2025
CVE-2025-66454MEDIUM6.5
  • PythonPython
  • arcade-mcp-server
NoYesDec 02, 2025
CVE-2025-66424MEDIUM6.5
  • PythonPython
  • trytond
NoYesNov 30, 2025
CVE-2025-66422MEDIUM4.3
  • PythonPython
  • tryton-server
NoYesNov 30, 2025
CVE-2025-65858LOW3.5
  • PythonPython
  • calibreweb
NoNoDec 02, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management