CVE-2021-37642
Python vulnerability analysis and mitigation

Overview

TensorFlow, an end-to-end open source platform for machine learning, was found to have a vulnerability in the implementation of tf.raw_ops.ResourceScatterDiv that made it susceptible to a division by zero error. The vulnerability, identified as CVE-2021-37642, was discovered by members of the Aivul Team from Qihoo 360 and affected TensorFlow versions prior to 2.6.0 (GitHub Advisory).

Technical details

The vulnerability exists in the implementation of tf.raw_ops.ResourceScatterDiv, which uses a common class for all binary operations but fails to handle the division by zero case separately. The issue was present in the resourcevariableops.cc file, where the implementation did not validate input values for zero before performing division operations (TF Commit).

Impact

When exploited, this vulnerability could lead to division by zero errors in TensorFlow applications. A simple proof of concept demonstrates the vulnerability: import tensorflow as tf; v= tf.Variable([1,2,3]); tf.raw_ops.ResourceScatterDiv(resource=v.handle, indices=[1], updates=[0]) (GitHub Advisory).

Mitigation and workarounds

The issue has been patched in TensorFlow 2.6.0 and backported to versions 2.5.1, 2.4.3, and 2.3.4. The fix implements input validation to prevent division by zero operations. Users are recommended to upgrade to these patched versions (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-2025-65896CRITICAL9.8
  • PythonPython
  • asyncmy
NoNoDec 02, 2025
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-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