CVE-2021-41210: TensorFlow - Out-of-Bounds Read in SparseCountSparseOutput Shape Inference Functions
Summary
CVE-2021-41210: Heap OOB read in tf.raw_ops.SparseCountSparseOutput. Affects tensorflow across 3 version ranges.
< 2.4.4
>= 2.5.0, < 2.5.2
>= 2.6.0, < 2.6.1
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
- tensorflow · PyPI
- tensorflow · PyPI
- tensorflow-cpu · PyPI
- tensorflow-gpu · PyPI
The same CVE-2021-41210 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 platform for machine learning. It provides a comprehensive ecosystem of tools, libraries, and resources for developing and deploying machine learning models. TensorFlow allows users to build and train neural networks, perform data preprocessing and augmentation, and deploy models in various environments. It is widely used in both research and production settings.
Vulnerability Detail
The vulnerability identified as CVE-2021-41210 affects TensorFlow versions 2.4.4, 2.5.2, and 2.6.0. It resides in the shape inference functions for SparseCountSparseOutput, which can trigger a read outside the bounds of a heap-allocated array. This out-of-bounds read can lead to memory corruption and potentially allow an attacker to execute arbitrary code or cause a denial-of-service condition. The severity of this vulnerability is rated as High.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
< 2.4.42.4.4 -
>= 2.5.0, < 2.5.22.5.2 -
>= 2.6.0, < 2.6.12.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. It is recommended to apply the available patches or update to the fixed versions of TensorFlow as mentioned in the 'how_to_fix' section.
Conclusion
The vulnerability in TensorFlow's shape inference functions for SparseCountSparseOutput can lead to memory corruption and potential code execution or denial-of-service. It is crucial to update TensorFlow to the fixed versions or apply the available patches to mitigate this vulnerability. For further support on vulnerability remediation, contact DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
TensorFlow is an open source platform for machine learning that provides tools and libraries for building and deploying machine learning models.
This vulnerability can lead to memory corruption and potentially allow an attacker to execute arbitrary code or cause a denial-of-service condition.
The vulnerability affects TensorFlow versions 2.4.4, 2.5.2, and 2.6.0.
To fix this vulnerability, update TensorFlow to version 2.7.0 or apply the available patches for versions 2.6.1, 2.5.2, and 2.4.4.
No specific workaround is provided. It is recommended to update to the fixed versions or apply the available patches.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.