CVE-2021-37682: TensorFlow GPU - Uninitialized Values in TFLite Operations
Summary
CVE-2021-37682: TensorFlow is an end-to-end open source platform for machine learning. Affects tensorflow-gpu across 5 version ranges.
>= 2.3.0, < 2.3.4
>= 2.4.0, < 2.4.3
< 4a91f2069f7145aab6ba2d8cfe41be8a110c18a5
< 537bc7c723439b9194a358f64d871dd326c18887
< 8933b8a21280696ab119b63263babdb54c298538
Fixed in 2.3.4 or 2.4.3, depending on the release line you run. How to fix ↓
Also tracked for
- tensorflow · Bitnami
- tensorflow · PyPI
- tensorflow · PyPI
- tensorflow-cpu · PyPI
The same CVE-2021-37682 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 of tools, libraries, and resources for developing and deploying machine learning models. TensorFlow GPU is a specific package that enables GPU acceleration for TensorFlow. It allows users to leverage the power of GPUs to accelerate their machine learning workflows.
Vulnerability Detail
The vulnerability (CVE-2021-37682) in TensorFlow GPU affects all TFLite operations that use quantization. These operations can be made to use uninitialized values, leading to unpredictable behavior and potential security risks. The issue arises from the lack of proper checks for the validity of quantization.params when quantization.type is kTfLiteNoQuantization. This oversight is present in various parts of the codebase. Exploiting this vulnerability could result in incorrect model outputs, data leakage, or even remote code execution.
How To Fix
Latest published version: 2.12.0 as of 22 Oct 2026
pip install --upgrade "tensorflow-gpu==2.12.0"
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
>= 2.3.0, < 2.3.42.3.4pip install --upgrade "tensorflow-gpu==2.3.4" -
>= 2.4.0, < 2.4.32.4.3pip install --upgrade "tensorflow-gpu==2.4.3"
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 specific workaround provided for this vulnerability. It is recommended to apply the available patches or update to the fixed versions of TensorFlow GPU as soon as they are released.
Conclusion
The vulnerability (CVE-2021-37682) in TensorFlow GPU exposes TFLite operations using quantization to uninitialized values. This can result in unpredictable behavior and potential security risks. It is crucial to apply the provided patches or update to the fixed versions of TensorFlow GPU to mitigate these risks. For further support on vulnerability remediation, you can reach out to DevNack.com.
See every vulnerability recorded for tensorflow-gpu →
FAQ
TensorFlow GPU is a package that enables GPU acceleration for TensorFlow, allowing users to leverage the power of GPUs for faster machine learning computations.
TFLite (TensorFlow Lite) is a lightweight version of TensorFlow designed for mobile and embedded devices. It provides tools and libraries for deploying machine learning models on resource-constrained platforms.
Quantization is a technique used to reduce the memory footprint and computational requirements of machine learning models. It involves representing numerical values with fewer bits, sacrificing some precision in exchange for improved efficiency.
Exploiting this vulnerability could lead to incorrect model outputs, data leakage, or even remote code execution. It is important to apply the necessary patches or updates to mitigate these risks.
You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities without requiring access to the code or installation.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.