CVE-2021-41222
Python vulnerability analysis and mitigation

Overview

CVE-2021-41222 is a vulnerability in TensorFlow, an open source platform for machine learning. The vulnerability was discovered in the implementation of SplitV operation, where negative arguments in the size_splits parameter could trigger a segmentation fault. This vulnerability affects TensorFlow versions prior to 2.7.0, and was disclosed on November 4, 2021. The affected versions include all releases before 2.7.0, with patched versions being 2.4.4, 2.5.2, and 2.6.1 (GitHub Advisory).

Technical details

The vulnerability occurs in the SplitV operation when size_splits contains more than one value and at least one value is negative. When these conditions are met, the negative size in one of the split sizes allows the computed size of another split to exceed the total dimension, leading to a segmentation fault. The vulnerability can be triggered with a simple code snippet using TensorFlow's raw operations: tf.raw_ops.SplitV(value=tf.constant([]), size_splits=[-1, -2], axis=0, num_split=2) (GitHub Advisory).

Impact

When exploited, this vulnerability causes a segmentation fault in the application, potentially leading to program crashes. This could be particularly impactful in production environments where TensorFlow is being used for machine learning operations (GitHub Advisory).

Mitigation and workarounds

The issue has been patched in TensorFlow 2.7.0 and backported to versions 2.4.4, 2.5.2, and 2.6.1. The fix involves adding validation checks for negative sizes in the split operation. Users should upgrade to these patched versions to mitigate the vulnerability. The fix was implemented in GitHub commit 25d622ffc432acc736b14ca3904177579e733cc6 (GitHub Advisory, 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

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