CVE-2021-41225
Python vulnerability analysis and mitigation

Overview

TensorFlow is an open source platform for machine learning. In affected versions prior to 2.7.0, TensorFlow's Grappler optimizer contained a use of uninitialized variable vulnerability. The issue was discovered and disclosed on November 4, 2021, affecting TensorFlow versions 2.4.0 through 2.6.x (GitHub Advisory).

Technical details

The vulnerability occurs when the train_nodes vector (obtained from the saved model that gets optimized) does not contain a Dequeue node, resulting in the dequeue_node variable being left uninitialized before use. The issue has been assigned CVE-2021-41225 with a CVSS v3.1 base score of 5.5 MEDIUM according to GitHub's assessment, while the NVD rates it as 7.8 HIGH with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (NVD).

Impact

When exploited, this vulnerability could lead to use of uninitialized memory, potentially resulting in program crashes or undefined behavior. The vulnerability requires local access and low privileges to exploit (NVD).

Mitigation and workarounds

The issue has been patched in TensorFlow version 2.7.0. The fix was also backported to versions 2.6.1, 2.5.2, and 2.4.4. Users are advised to upgrade to these patched versions. The fix involves properly initializing the dequeue_node variable to nullptr (GitHub Commit).

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