CVE-2021-41204
Python vulnerability analysis and mitigation

Overview

TensorFlow, an open source platform for machine learning, was affected by a vulnerability (CVE-2021-41204) during its Grappler optimizer phase. The issue was discovered where constant folding might attempt to deep copy a resource tensor, resulting in a segmentation fault since these tensors are not supposed to change. The vulnerability was disclosed on November 4, 2021, affecting TensorFlow versions prior to 2.7.0 (GitHub Advisory).

Technical details

The vulnerability occurs in TensorFlow's Grappler optimizer phase when attempting to perform constant folding operations on resource tensors. The core issue lies in the improper handling of resource tensors during deep copy operations, which violates the fundamental assumption that these tensors should remain unchanged. The vulnerability has been assigned a CVSS v3.1 Base Score of 5.5 MEDIUM (Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H) (NVD).

Impact

When exploited, this vulnerability results in a segmentation fault, which can lead to application crashes. This could potentially cause denial of service conditions in systems running affected versions of TensorFlow (GitHub Advisory).

Mitigation and workarounds

The vulnerability was patched in TensorFlow version 2.7.0. The fix was also backported to versions 2.6.1, 2.5.2, and 2.4.4. The patch prevents constant folding of resource tensors by adding a check in the IsConstantFoldable function. Users are advised 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-2026-22612HIGH8.9
  • PythonPython
  • fickling
NoYesJan 10, 2026
CVE-2026-22609HIGH8.9
  • PythonPython
  • fickling
NoYesJan 10, 2026
CVE-2026-22608HIGH8.9
  • PythonPython
  • fickling
NoYesJan 10, 2026
CVE-2026-22691LOW2.7
  • PythonPython
  • pypdf
NoYesJan 10, 2026
CVE-2026-22690LOW2.7
  • PythonPython
  • pypdf
NoYesJan 10, 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