CVE-2021-37659
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-37659) that affects versions prior to 2.6.0. The vulnerability was discovered and disclosed on August 11, 2021, affecting all binary cwise operations that don't require broadcasting in TensorFlow (GitHub Advisory).

Technical details

The vulnerability exists in the implementation of binary cwise operations where the code assumes that two inputs have exactly the same number of elements but fails to validate this assumption. This oversight can lead to undefined behavior through binding a reference to a null pointer. The issue was present in the implementation at tensorflow/core/kernels/cwise_ops_common.h (TensorFlow Commit).

Impact

When exploited, this vulnerability can trigger heap out-of-bounds reads and undefined behavior due to binding to nullptr. This can occur when an attacker crafts specific inputs where the two arguments to a cwise operation have different numbers of elements (GitHub Advisory).

Mitigation and workarounds

The issue has been patched in TensorFlow versions 2.3.4, 2.4.3, 2.5.1, and 2.6.0. The fix involves adding explicit validation of input tensor sizes before processing. Users are recommended to upgrade to these patched versions to address the vulnerability (GitHub Advisory).

Community reactions

The vulnerability was reported by members of the Aivul Team from Qihoo 360, demonstrating ongoing security research in the machine learning framework ecosystem (GitHub 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-22871HIGH8.7
  • PythonPython
  • guarddog
NoYesJan 13, 2026
GHSA-58pv-8j8x-9vj2HIGH8.6
  • PythonPython
  • jaraco.context
NoYesJan 13, 2026
CVE-2026-22779MEDIUM6.3
  • PythonPython
  • blacksheep
NoYesJan 14, 2026
CVE-2026-21889LOW2.3
  • PythonPython
  • weblate
NoYesJan 14, 2026
CVE-2025-68492LOW2.3
  • PythonPython
  • chainlit
NoYesJan 14, 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