CVE-2021-37656: TensorFlow CPU - Reference Binding to Null Pointer in tf.raw_ops.RaggedTensorToSparse
Summary
CVE-2021-37656: TensorFlow is an end-to-end open source platform for machine learning. Affects tensorflow-cpu across 3 version ranges.
>= 2.3.0, < 2.3.4
>= 2.4.0, < 2.4.3
< 1071f554dbd09f7e101324d366eec5f4fe5a3ece
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-gpu · PyPI
The same CVE-2021-37656 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 CPU is a specific package within TensorFlow that focuses on running TensorFlow on CPUs. It is widely used in various industries and research domains for machine learning tasks.
Vulnerability Detail
In affected versions of TensorFlow CPU, there is a vulnerability in the tf.raw_ops.RaggedTensorToSparse function. An attacker can exploit this vulnerability by binding a reference to a null pointer, causing undefined behavior. The implementation of the function lacks proper validation of the splits values, specifically the check for increasing order. This oversight allows an attacker to manipulate the splits values and potentially disrupt the execution of the function. The vulnerability can lead to unexpected program behavior, crashes, or even potential security breaches.
How To Fix
Latest published version: 2.21.0 as of 22 Oct 2026
pip install --upgrade "tensorflow-cpu==2.21.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-cpu==2.3.4" -
>= 2.4.0, < 2.4.32.4.3pip install --upgrade "tensorflow-cpu==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 known workaround for this vulnerability. It is recommended to apply the official patch or update to a patched version of TensorFlow CPU as mentioned in the 'how_to_fix' section.
Conclusion
In conclusion, TensorFlow CPU is vulnerable to a reference binding to a null pointer in the tf.raw_ops.RaggedTensorToSparse function. This vulnerability can be exploited by an attacker to cause undefined behavior and potentially disrupt the execution of the function. It is crucial to update TensorFlow CPU to a patched version or apply the official patch to mitigate this vulnerability. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow-cpu →
FAQ
TensorFlow CPU is a package within TensorFlow that focuses on running TensorFlow on CPUs. It provides the necessary components and optimizations for efficient execution of machine learning models on CPU hardware.
This vulnerability allows an attacker to cause undefined behavior in TensorFlow CPU by binding a reference to a null pointer. It can lead to unexpected program behavior, crashes, or potential security breaches.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities, using just the Pipfile.lock file.
There is no known workaround for this vulnerability. It is recommended to apply the official patch or update to a patched version of TensorFlow CPU.
You can find more information about this vulnerability in the official TensorFlow advisory database. The source for this vulnerability is available at https://github.com/pypa/advisory-database/blob/main/vulns/tensorflow-cpu/PYSEC-2021-569.yaml.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-cpu.