CVE-2021-29598: TensorFlow SVDF Operator Division by Zero Vulnerability

tensorflow Updated 02 Oct 2025

Summary

06/03/2024
Yes i
High
Not published

CVE-2021-29598: Division by zero in TFLite's implementation of SVDF. 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

The same CVE-2021-29598 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

TensorFlow is an end-to-end open source platform for machine learning. It provides a comprehensive ecosystem for developing and deploying machine learning models. The SVDF (Singular Value Decomposition Filter) operator is a component of TensorFlow that is used for processing sequential data. It is vulnerable to a division by zero error, which can be exploited by an attacker to cause a denial of service or potentially execute arbitrary code.

Vulnerability Detail

The vulnerability in the SVDF TFLite operator arises from a lack of proper input validation. An attacker can craft a malicious model in such a way that the params->rank parameter is set to zero, triggering a division by zero error. This can lead to a crash or unexpected behavior in the TensorFlow runtime. The impact of this vulnerability can range from a denial of service to potential code execution, depending on the context in which TensorFlow is being used.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 2.1.4 2.1.4
  • >= 2.2.0, < 2.2.3 2.2.3
  • >= 2.3.0, < 2.3.3 2.3.3
  • >= 2.4.0, < 2.4.2 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 known workaround for this vulnerability. It is recommended to apply the available fixes as mentioned in the 'how_to_fix' section.

Conclusion

The TensorFlow SVDF operator division by zero vulnerability can be mitigated by upgrading to the fixed versions or applying the available patches. It is important to keep TensorFlow and other dependencies up to date to ensure the security of machine learning models. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

TensorFlow is an open source platform for machine learning that provides a comprehensive ecosystem for developing and deploying machine learning models.

The SVDF (Singular Value Decomposition Filter) operator is a component of TensorFlow used for processing sequential data.

The impact of this vulnerability can range from a denial of service to potential code execution, depending on the context in which TensorFlow is being used.

The vulnerability can be fixed by upgrading to TensorFlow 2.5.0 or later. Alternatively, users of affected versions can update to the respective fixed versions (TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3, or TensorFlow 2.1.4).

There is no known workaround for this vulnerability. It is recommended to apply the available fixes as mentioned in the 'how_to_fix' section.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 2.1.4 2.1.4
  • >= 2.2.0, < 2.2.3 2.2.3
  • >= 2.3.0, < 2.3.3 2.3.3
  • >= 2.4.0, < 2.4.2 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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback