CVE-2021-29562: CHECK-fail in tf.raw_ops.IRFFT
Summary
CVE-2021-29562: CHECK-fail in tf.raw_ops.IRFFT. Affects tensorflow across 4 version ranges.
< 2.1.4
>= 2.2.0, < 2.2.3
>= 2.3.0, < 2.3.3
>= 2.4.0, < 2.4.2
Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓
Also tracked for
- tensorflow · Bitnami
- tensorflow-cpu · PyPI
- tensorflow-gpu · PyPI
The same CVE-2021-29562 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 vulnerability affects versions of TensorFlow prior to 2.1.4, 2.2.3, 2.3.3, and 2.4.2. TensorFlow's tf.raw_ops.IRFFT function is susceptible to a CHECK-fail vulnerability, which can be exploited to cause a denial of service (DoS) attack. This vulnerability was reported by Yakun Zhang and Ying Wang of Baidu X-Team.
Vulnerability Detail
The vulnerability arises from a CHECK-failure in the implementation of tf.raw_ops.IRFFT. An attacker can trigger this vulnerability by providing specific input values that cause Eigen code to operate on an empty matrix. This leads to an assertion failure and program termination. The impact of this vulnerability is a DoS attack, as the program terminates unexpectedly. The vulnerability has a CVSS score of 2.5, indicating a low severity level.
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 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.1.42.1.4pip install --upgrade "tensorflow==2.1.4" -
>= 2.2.0, < 2.2.32.2.3pip install --upgrade "tensorflow==2.2.3" -
>= 2.3.0, < 2.3.32.3.3pip install --upgrade "tensorflow==2.3.3" -
>= 2.4.0, < 2.4.22.4.2pip install --upgrade "tensorflow==2.4.2"
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 mentioned for this vulnerability.
Conclusion
The vulnerability in TensorFlow's tf.raw_ops.IRFFT function can be exploited to cause a denial of service (DoS) attack. It has been patched in TensorFlow 2.5.0 and backported to earlier versions. Users are advised to upgrade to the patched versions to mitigate the vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
The vulnerability can be exploited to cause a denial of service (DoS) attack by terminating the program unexpectedly.
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 without requiring access to the code or installation.
The vulnerability has a CVSS score of 2.5, indicating a low severity level.
This vulnerability was reported by Yakun Zhang and Ying Wang of Baidu X-Team.
You can refer to the TensorFlow security guide at https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md for more information regarding the security model and how to contact the TensorFlow team with any issues or questions.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.