CVE-2020-15199: TensorFlow - Invalid Ragged Tensor Validation
Summary
CVE-2020-15199: Denial of Service in Tensorflow. Affects tensorflow versions >= 2.3.0, < 2.3.1. Fixed in 2.3.1. How to fix ↓
Also tracked for
- tensorflow · PyPI
- tensorflow-cpu · PyPI
- tensorflow-gpu · PyPI
- tensorflow · PyPI
The same CVE-2020-15199 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 framework developed by Google. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning models. TensorFlow allows users to create and manipulate tensors, which are multi-dimensional arrays used as the fundamental data structure in machine learning algorithms. The RaggedCountSparseOutput is a feature in TensorFlow that counts the number of non-zero elements in a ragged tensor, which is a tensor with variable-length dimensions. This vulnerability affects TensorFlow versions prior to 2.3.1.
Vulnerability Detail
The vulnerability in TensorFlow arises from the lack of validation in the RaggedCountSparseOutput function. Specifically, it fails to check if the input arguments form a valid ragged tensor, particularly the splits tensor. The splits tensor must have a minimum required number of elements, but this is not validated. Consequently, when initializing the BatchedMap data structure, which is equivalent to a vector, a SIGABRT signal is raised by the operating system if the splits tensor is empty or has only one element. This vulnerability can potentially lead to a denial-of-service (DoS) scenario. The issue has been patched in commit 3cbb917b4714766030b28eba9fb41bb97ce9ee02 and is released in TensorFlow version 2.3.1.
How To Fix
Minimum fixed version
2.3.1
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is recommended to apply the fix mentioned above.
Conclusion
The vulnerability in TensorFlow versions prior to 2.3.1 allows for a denial-of-service (DoS) scenario due to the lack of validation in the RaggedCountSparseOutput function. Users should upgrade to TensorFlow 2.3.1 or later to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
TensorFlow is an open-source machine learning framework developed by Google.
A ragged tensor is a tensor with variable-length dimensions.
The RaggedCountSparseOutput function counts the number of non-zero elements in a ragged tensor.
This vulnerability can lead to a denial-of-service (DoS) scenario.
Upgrade your TensorFlow installation to version 2.3.1 or later.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.