CVE-2021-37644
Python vulnerability analysis and mitigation

Overview

TensorFlow, an end-to-end open source platform for machine learning, was found to have a vulnerability (CVE-2021-37644) where providing a negative element to the num_elements list argument of tf.raw_ops.TensorListReserve would cause the runtime to abort the process. This occurred due to an attempt to reallocate a std::vector with a negative number of elements. The vulnerability was discovered and disclosed in August 2021, affecting TensorFlow versions prior to 2.6.0 (GitHub Advisory).

Technical details

The vulnerability stems from the implementation calling std::vector.resize() with a new size controlled by user input, without validating that this input is valid. When a negative value is provided to the num_elements parameter, it triggers a process abort due to invalid memory allocation attempt. The issue was present in the TensorFlow core kernels, specifically in the list_kernels.cc file (TensorFlow Commit).

Impact

When exploited, this vulnerability causes the runtime to abort the process, effectively creating a denial of service condition. The vulnerability could be triggered by any user with the ability to provide input to the TensorListReserve operation (GitHub Advisory).

Mitigation and workarounds

The issue was patched in GitHub commit 8a6e874437670045e6c7dc6154c7412b4a2135e2 and included in TensorFlow 2.6.0. The fix was also backported to TensorFlow versions 2.5.1, 2.4.3, and 2.3.4. Users are recommended to upgrade to these patched versions to mitigate the vulnerability (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-23949HIGH8.6
  • PythonPython
  • jaraco.context
NoYesJan 20, 2026
CVE-2026-22219HIGH8.3
  • PythonPython
  • chainlit
NoYesJan 20, 2026
CVE-2026-23842HIGH7.5
  • PythonPython
  • chatterbot
NoYesJan 19, 2026
CVE-2026-23877MEDIUM5.3
  • PythonPython
  • swingmusic
NoYesJan 19, 2026
CVE-2026-23833LOW1.7
  • PythonPython
  • esphome
NoYesJan 19, 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