CVE-2021-29523
Python vulnerability analysis and mitigation

Overview

TensorFlow, an end-to-end open source platform for machine learning, was found to contain a vulnerability (CVE-2021-29523) that allows attackers to trigger a denial of service via a CHECK-fail in tf.raw_ops.AddManySparseToTensorsMap. The vulnerability was discovered and reported by Yakun Zhang and Ying Wang of Baidu X-Team, and was publicly disclosed on May 14, 2021. This issue affects TensorFlow versions prior to 2.5.0 (GitHub Security).

Technical details

The vulnerability stems from the implementation taking values specified in sparse_shape as dimensions for the output shape. The TensorShape constructor uses a CHECK operation which triggers when InitDims returns a non-OK status. The issue occurs when adding a dimension from the argument results in overflow. This is a legacy implementation of the constructor, and operations should use BuildTensorShapeBase or AddDimWithStatus to prevent CHECK-failures in the presence of overflows. The vulnerability has been assigned a CVSS v3.1 score of 5.5 (Medium) and a CVSS v2.0 score of 2.1 (Low) (CISA Bulletin).

Impact

An attacker can exploit this vulnerability to trigger a denial of service attack through a CHECK-fail in the TensorFlow library. The issue occurs when processing specific input parameters that cause an overflow condition, leading to a program crash (GitHub Security).

Exploitability

The vulnerability can be exploited by providing specially crafted inputs to the tf.raw_ops.AddManySparseToTensorsMap operation. A proof of concept exists that demonstrates the vulnerability using specific tensor values and shapes that trigger the overflow condition (GitHub Security).

Mitigation and workarounds

The issue has been patched in TensorFlow version 2.5.0. The fix was also backported to versions 2.4.2, 2.3.3, 2.2.3, and 2.1.4. Users are advised to upgrade to these patched versions. The fix was implemented in GitHub commit 69c68ecbb24dff3fa0e46da0d16c821a2dd22d7c (GitHub Security).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Arch Linux

Fixed

rolling

tensorflow: 2.5.0-1

Fixed

SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-59971CRITICAL10
  • Python logoPython
  • mysql-mcp-server
NoYesSep 11, 2026
CVE-2026-59177HIGH8.8
  • Python logoPython
  • esphome-device-builder
NoYesSep 09, 2026
CVE-2026-88006MEDIUM6.5
  • Python logoPython
  • open-webui
NoYesSep 10, 2026
CVE-2026-88005MEDIUM6.5
  • Python logoPython
  • open-webui
NoYesSep 10, 2026
CVE-2026-49836MEDIUM4.6
  • Python logoPython
  • psd-tools
NoYesSep 10, 2026

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