CVE-2022-41890: TensorFlow CHECK Fail in BCast Overflow
Summary
CVE-2022-41890: CHECK fail in BCast overflow. Affects tensorflow across 3 version ranges.
< 2.8.4
>= 2.9.0, < 2.9.3
>= 2.10.0, < 2.10.1
Fixed in 2.8.4, 2.9.3 or 2.10.1, depending on the release line you run. How to fix ↓
Also tracked for
- tensorflow-cpu · PyPI
- tensorflow-gpu · PyPI
- tensorflow · Bitnami
The same CVE-2022-41890 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
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.
No signup required · Results in about 60 seconds
Background
TensorFlow is an open-source machine learning library widely used for various applications, including deep learning and neural networks. It provides a flexible ecosystem for building and deploying machine learning models. This vulnerability arises from a failure in the BCast utility, which is responsible for broadcasting operations in TensorFlow. The issue specifically affects the handling of large input shapes, leading to potential crashes.
Vulnerability Detail
The vulnerability occurs in the BCast::ToShape function, which is designed to handle input shapes up to int64. However, if it receives an input larger than int32, it results in a crash. This can be exploited by passing large input shapes to functions like tf.experimental.numpy.outer, causing the application to fail unexpectedly. The impact of this vulnerability can lead to service disruptions and hinder the functionality of applications relying on TensorFlow for machine learning tasks.
How To Fix
Latest published version: 2.21.0 as of 22 Oct 2026
pip install --upgrade "tensorflow==2.21.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.8.42.8.4pip install --upgrade "tensorflow==2.8.4" -
>= 2.9.0, < 2.9.32.9.3pip install --upgrade "tensorflow==2.9.3" -
>= 2.10.0, < 2.10.12.10.1pip install --upgrade "tensorflow==2.10.1"
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
As a temporary workaround, avoid using large input shapes that exceed int32 limits when calling functions like tf.experimental.numpy.outer. For example, instead of using a shape like [2, 1024, 1024, 1024], consider reducing the dimensions to stay within safe limits.
Conclusion
CVE-2022-41890 is a significant vulnerability in TensorFlow that can lead to application crashes when handling large input shapes. It is crucial to update to the patched versions to mitigate this risk and ensure the stability of your machine learning applications.
See every vulnerability recorded for tensorflow →
FAQ
CVE-2022-41890 is a vulnerability in TensorFlow that causes a crash when large input shapes are processed due to a failure in the BCast utility.
If your application uses TensorFlow and processes large input shapes, it may crash unexpectedly, leading to service disruptions.
Affected versions include TensorFlow 2.8.4, 2.9.0, 2.10.0, and earlier versions. The vulnerability is fixed in versions 2.11, 2.10.1, 2.9.3, and 2.8.4.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Check your application using the Vulert playground without any signup.
The CVSS score for this vulnerability is 4.8, indicating a moderate severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.