
Cloud Vulnerability DB
A community-led vulnerabilities database
TensorFlow's implementation of tf.raw_ops.SparseReshape contained a vulnerability (CVE-2021-37640) that could trigger an integral division by zero exception. The vulnerability was discovered in versions prior to 2.6.0 and affected the sparse tensor reshaping functionality. The issue was patched in TensorFlow 2.6.0 and backported to version 2.5.1 (GitHub Advisory).
The vulnerability existed in the implementation of tf.raw_ops.SparseReshape where the reshaping functor was called whenever there was at least one index in the input, without verifying that both the input shape and target shape had non-zero number of elements. The reshape functor would perform division operations using the dimensions of the target shape without proper validation, leading to potential division by zero errors (GitHub Commit).
When exploited, this vulnerability could cause the application to crash due to division by zero exceptions, potentially leading to denial of service conditions. The issue could be triggered by providing specific inputs to the SparseReshape operation where either the input shape or target shape contained zero elements (GitHub Advisory).
The issue was fixed by adding validation checks to ensure that when reshaping tensors with non-zero elements, both the input and output shapes must have non-zero elements. Users are advised to upgrade to TensorFlow version 2.6.0 or apply the backported fix in version 2.5.1 (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."