CVE-2021-37641: TensorFlow - Out-of-Bounds Read in tf.raw_ops.RaggedGather
Summary
CVE-2021-37641: Heap OOB in RaggedGather in TensorFlow. Affects tensorflow across 3 version ranges.
>= 2.3.0, < 2.3.4
>= 2.4.0, < 2.4.3
>= 2.5.0, < 2.5.1
Fixed in 2.3.4, 2.4.3 or 2.5.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-37641 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 developing and deploying machine learning models. TensorFlow is widely used in various domains, including research, industry, and academia. This vulnerability affects versions 2.3.0 to 2.6.0-rc2 of the TensorFlow package.
Vulnerability Detail
The vulnerability (CVE-2021-37641) arises when the arguments passed to tf.raw_ops.RaggedGather do not form a valid ragged tensor code. This can lead to a read operation outside the bounds of heap allocated buffers. The implementation of the function fails to check if the tensor has a rank of at least 1 and does not validate the list of tensors provided by params_nested_splits. An attacker can exploit this vulnerability to read sensitive information from memory or cause a denial-of-service condition.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
>= 2.3.0, < 2.3.42.3.4 -
>= 2.4.0, < 2.4.32.4.3 -
>= 2.5.0, < 2.5.12.5.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 known workaround for this vulnerability. It is recommended to update TensorFlow to the patched version as soon as possible.
Conclusion
The vulnerability (CVE-2021-37641) in TensorFlow can lead to out-of-bounds reads and potential information disclosure or denial-of-service attacks. It is crucial to update TensorFlow to the latest patched version or apply the provided fix to mitigate the risk. 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 developing and deploying machine learning models.
Versions 2.3.0 to 2.6.0-rc2 of TensorFlow are affected by this vulnerability.
This vulnerability can be exploited to read sensitive information from memory or cause a denial-of-service condition.
To fix this vulnerability, update TensorFlow to version 2.6.0 or apply the appropriate patch.
There is no known workaround for this vulnerability. Updating to the patched version is recommended.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.