CVE-2021-41206: TensorFlow GPU Operations Shape Validation Vulnerability

tensorflow-gpu Updated 02 Oct 2025

Summary

05/11/2021
Yes i
Unrated
Not published

CVE-2021-41206: TensorFlow is an open source platform for machine learning. Affects tensorflow-gpu across 9 version ranges.

< 2.4.4 >= 2.5.0, < 2.5.2 >= 2.6.0, < 2.6.1 < 4d74d8a00b07441cba090a02e0dd9ed385145bf4 < 4dddb2fd0b01cdd196101afbba6518658a2c9e07 < 68422b215e618df5ad375bcdc6d2052e9fd3080a < 579261dcd446385831fe4f7457d802a59685121d < da4aad5946be30e5f049920fa076e1f7ef021261 < e7f497570abb6b4ae5af4970620cd880e4c0c904

Fixed in 2.4.4, 2.5.2 or 2.6.1, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2021-41206 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

TensorFlow is an open-source platform for machine learning. It provides a comprehensive ecosystem of tools, libraries, and resources for developing and deploying machine learning models. TensorFlow is widely used in various domains, including research, industry, and academia. The TensorFlow GPU package, specifically tensorflow-gpu, is a PyPI package that enables GPU acceleration for TensorFlow computations. It allows users to leverage the power of GPUs to accelerate machine learning tasks, improving performance and efficiency.

Vulnerability Detail

The TensorFlow GPU operations shape validation vulnerability (CVE-2021-41206) arises from missing validation for the shapes of tensor arguments in several TensorFlow operations. This vulnerability affects multiple versions of TensorFlow, including 2.4.4, 2.5.2, 2.6.1, and will be fixed in the upcoming release of TensorFlow 2.7.0. The absence of shape validation can lead to undefined behavior, segfaults, CHECK-fail related crashes, and potential read and write operations on heap populated arrays. The vulnerability was discovered internally while working on improving and testing GPU op determinism, and although no specific reproducers are available, multiple fixes will be implemented to address these issues.

How To Fix

Latest published version: 2.12.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-gpu==2.12.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 2.4.4 2.4.4
    pip install --upgrade "tensorflow-gpu==2.4.4"
  • >= 2.5.0, < 2.5.2 2.5.2
    pip install --upgrade "tensorflow-gpu==2.5.2"
  • >= 2.6.0, < 2.6.1 2.6.1
    pip install --upgrade "tensorflow-gpu==2.6.1"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

There is no specific workaround provided for this vulnerability. However, users can mitigate the risk by updating their TensorFlow installations to the fixed versions mentioned above.

Conclusion

The TensorFlow GPU operations shape validation vulnerability (CVE-2021-41206) poses a risk to users of affected versions of TensorFlow. To mitigate this vulnerability, it is crucial to update to the fixed versions of TensorFlow, including 2.7.0, 2.6.1, 2.5.2, or 2.4.4. Regularly updating software and staying informed about security vulnerabilities is essential to ensure the safety and integrity of machine learning workflows. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow-gpu →

Share this vulnerability

FAQ

TensorFlow is an open-source platform for machine learning that provides tools and resources for developing and deploying machine learning models.

The TensorFlow GPU package, tensorflow-gpu, is a PyPI package that enables GPU acceleration for TensorFlow computations.

The vulnerability can result in undefined behavior, crashes, and potential read and write operations on heap populated arrays.

The vulnerability was discovered internally while working on improving and testing GPU op determinism.

There are no known exploits of this vulnerability at the time of this report.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow-gpu.

How To Fix

Latest published version: 2.12.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-gpu==2.12.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 2.4.4 2.4.4
    pip install --upgrade "tensorflow-gpu==2.4.4"
  • >= 2.5.0, < 2.5.2 2.5.2
    pip install --upgrade "tensorflow-gpu==2.5.2"
  • >= 2.6.0, < 2.6.1 2.6.1
    pip install --upgrade "tensorflow-gpu==2.6.1"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback