CVE-2021-29596: TensorFlow - Division by Zero Vulnerability
Summary
CVE-2021-29596: Division by zero in TFLite's implementation of EmbeddingLookup. Affects tensorflow across 4 version ranges.
< 2.1.4
>= 2.2.0, < 2.2.3
>= 2.3.0, < 2.3.3
>= 2.4.0, < 2.4.2
Fixed in 4 releases; the minimum fixed version depends 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-29596 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 end-to-end open source platform for machine learning. It provides a comprehensive ecosystem for building and deploying machine learning models. TensorFlow is widely used in various industries and has a large community of developers and users. However, a vulnerability has been discovered in the implementation of the EmbeddingLookup TFLite operator, which can lead to a division by zero error.
Vulnerability Detail
The vulnerability in TensorFlow arises from a division by zero error in the EmbeddingLookup TFLite operator. An attacker can exploit this vulnerability by crafting a malicious model that sets the first dimension of the value input to 0. When this model is executed, it triggers a division by zero error, which can lead to various consequences depending on the context in which TensorFlow is used. The impact of this vulnerability can range from denial of service to potential code execution.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
< 2.1.42.1.4 -
>= 2.2.0, < 2.2.32.2.3 -
>= 2.3.0, < 2.3.32.3.3 -
>= 2.4.0, < 2.4.22.4.2
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 known workaround for this vulnerability. It is recommended to apply the available patches or update to the latest patched versions of TensorFlow as mentioned in the 'how_to_fix' section.
Conclusion
In conclusion, a division by zero vulnerability has been discovered in TensorFlow's EmbeddingLookup TFLite operator. This vulnerability can be exploited by crafting a malicious model and can lead to various consequences, including denial of service and potential code execution. It is crucial to update to the latest patched versions of TensorFlow or apply the available patches to mitigate the vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
TensorFlow is an open source platform for machine learning that provides a comprehensive ecosystem for building and deploying machine learning models.
The impact of this vulnerability can range from denial of service to potential code execution, depending on the context in which TensorFlow is used.
To fix this vulnerability, it is recommended to update to the latest patched versions of TensorFlow, which include the fix. Alternatively, you can wait for the release of TensorFlow 2.5.0, which will also include the fix.
No, only versions starting from 0 and up to TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3, and TensorFlow 2.1.4 are affected. It is recommended to update to the latest patched versions or apply the available patches to mitigate the vulnerability.
No, there is no known workaround for this vulnerability. It is recommended to apply the available patches or update to the latest patched versions of TensorFlow.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.