CVE-2021-29530
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-29530) that allows an attacker to trigger a null pointer dereference by providing an invalid permutation to tf.raw_ops.SparseMatrixSparseCholesky. The vulnerability was discovered on May 14, 2021, affecting TensorFlow versions prior to 2.5.0 (TF Advisory, NVD).

Technical details

The vulnerability stems from improper validation of input arguments in the implementation. The issue occurs because the ValidateInputs function uses the OP_REQUIRES macro, which only exits the current function when validation fails. Since OP_REQUIRES is a macro that expands to a return statement, calling it in a helper function only ends the helper function's execution earlier, but the kernel continues execution, making all expected validations ineffective (TF Commit). The CVSS v3.1 base score for this vulnerability is 7.8 HIGH (NVD).

Impact

When exploited, this vulnerability can lead to a null pointer dereference, potentially causing a denial of service condition in applications using the affected TensorFlow versions. The vulnerability affects the machine learning operations specifically when using the SparseMatrixSparseCholesky operation (TF Advisory).

Exploitability

The vulnerability can be triggered by providing an invalid permutation to tf.raw_ops.SparseMatrixSparseCholesky. A proof-of-concept exploit has been documented that demonstrates how an attacker can trigger the null pointer dereference using specific input parameters (TF Advisory).

Mitigation and workarounds

The vulnerability has been patched in TensorFlow 2.5.0. The fix has also been backported to TensorFlow 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 involves modifying the validation process to either explicitly check context->status() or convert ValidateInputs to return a Status (TF Advisory).

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-2026-61539CRITICAL10
  • Python logoPython
  • xinference
NoYesAug 21, 2026
CVE-2026-49360HIGH7.8
  • Python logoPython
  • recce
NoYesAug 21, 2026
CVE-2026-68508HIGH7.8
  • Python logoPython
  • hydra-core
NoYesAug 21, 2026
CVE-2026-54457HIGH7.7
  • Python logoPython
  • tensorzero
NoYesAug 21, 2026
CVE-2026-43980MEDIUM6.3
  • Python logoPython
  • malla
NoNoAug 21, 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