CVE-2020-15265: Segfault in tf.quantization.quantize_and_dequantize
Summary
CVE-2020-15265: Segfault in tf.quantization.quantize_and_dequantize. Affects tensorflow versions < 2.4.0. Fixed in 2.4.0. How to fix ↓
Also tracked for
- tensorflow · Bitnami
- tensorflow-cpu · PyPI
- tensorflow-gpu · PyPI
The same CVE-2020-15265 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
The TensorFlow package is an open-source machine learning framework developed by Google. It provides a comprehensive set of tools and libraries for building and deploying machine learning models. The tf.quantization.quantize_and_dequantize function is a part of TensorFlow's quantization module, which allows for quantizing and dequantizing tensors. This vulnerability affects versions of TensorFlow up to 2.4.0.
Vulnerability Detail
The vulnerability arises when an attacker passes an invalid 'axis' value to the tf.quantization.quantize_and_dequantize function. This leads to accessing a dimension outside the rank of the input tensor, resulting in a segfault and access out of bounds of the array. An attacker can exploit this vulnerability to cause a denial of service (DoS) attack or potentially execute arbitrary code.
How To Fix
Latest published version: 2.21.0 as of 22 Oct 2026
pip install --upgrade "tensorflow==2.21.0"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
2.4.0
This is the first release that contains the fix.
pip install --upgrade "tensorflow==2.4.0"
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 update to the patched version of TensorFlow as soon as possible.
Conclusion
The vulnerability in tf.quantization.quantize_and_dequantize in TensorFlow can lead to a denial of service (DoS) attack or potential code execution. It is crucial to update to TensorFlow version 2.4.0 or newer 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. It provides tools and libraries for building and deploying machine learning models.
tf.quantization.quantize_and_dequantize is a function in TensorFlow's quantization module that allows for quantizing and dequantizing tensors.
An attacker can exploit this vulnerability to cause a denial of service (DoS) attack or potentially execute arbitrary code.
To fix this vulnerability, users should update their TensorFlow package to version 2.4.0 or newer.
There is no known workaround for this vulnerability. It is recommended to update to the patched version of TensorFlow as soon as possible.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.