CVE-2021-41195
Python vulnerability analysis and mitigation

Overview

TensorFlow, an open source platform for machine learning, was found to contain a vulnerability (CVE-2021-41195) in the implementation of tf.math.segment_* operations. The vulnerability was discovered and disclosed on November 5, 2021. When a segment id in segment_ids is large, it results in a CHECK-fail related abort and denial of service. This affects TensorFlow versions prior to 2.4.4, 2.5.2, 2.6.1, and 2.7.0 (GitHub Advisory, NVD).

Technical details

The vulnerability stems from the implementation computing the output shape using AddDim. If the number of elements in the tensor overflows an int64_t value, AddDim results in a CHECK failure which triggers a std::abort. The correct implementation should use AddDimWithStatus instead. This issue is similar to CVE-2021-29584 and affects both CPU and GPU implementations (GitHub Advisory).

Impact

When exploited, this vulnerability leads to a denial of service condition through application crash. The vulnerability can be triggered when processing segment operations with large segment IDs, causing the application to abort execution (GitHub Advisory).

Mitigation and workarounds

The vulnerability was patched in TensorFlow versions 2.4.4, 2.5.2, 2.6.1, and 2.7.0. The fix was implemented in GitHub commit e9c81c1e1a9cd8dd31f4e83676cab61b60658429 and merged via pull request #51733. Users are advised to upgrade to the 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

GHSA-5882-5rx9-xgxpCRITICAL10
  • PythonPython
  • crawl4ai
NoYesJan 16, 2026
CVE-2026-23949HIGH8.6
  • PythonPython
  • jaraco.context
NoYesJan 20, 2026
GHSA-vx9w-5cx4-9796HIGH8.6
  • PythonPython
  • crawl4ai
NoYesJan 16, 2026
CVE-2026-23535HIGH8
  • PythonPython
  • wlc
NoYesJan 16, 2026
CVE-2026-23490HIGH7.5
  • PythonPython
  • fence-agents-intelmodular
NoYesJan 16, 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