CVE-2022-29206: TensorFlow - Missing Validation in SparseTensorDenseAdd

tensorflow Updated 02 Oct 2025

Summary

24/05/2022
Yes i
Moderate
5.5

CVE-2022-29206: Missing validation results in undefined behavior in SparseTensorDenseAdd. Affects tensorflow across 3 version ranges.

< 2.6.4 >= 2.7.0, < 2.7.2 >= 2.8.0, < 2.8.1

Fixed in 2.6.4, 2.7.2 or 2.8.1, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2022-29206 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

TensorFlow is an open-source machine learning framework developed by Google. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning models. TensorFlow includes various operations and functions for manipulating and processing tensors, which are multi-dimensional arrays. One of these operations is SparseTensorDenseAdd, which combines a sparse tensor with a dense tensor. This operation is used in many machine learning tasks, such as natural language processing and computer vision.

Vulnerability Detail

The vulnerability (CVE-2022-29206) in TensorFlow's SparseTensorDenseAdd operation arises from a missing validation of input arguments. When certain input arguments are not properly validated, a reference can be bound to a null pointer during kernel execution, resulting in undefined behavior. This vulnerability can potentially lead to crashes, memory corruption, or other unpredictable outcomes. It has a CVSS score of 5.5, indicating a moderate 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.6.4 2.6.4
    pip install --upgrade "tensorflow==2.6.4"
  • >= 2.7.0, < 2.7.2 2.7.2
    pip install --upgrade "tensorflow==2.7.2"
  • >= 2.8.0, < 2.8.1 2.8.1
    pip install --upgrade "tensorflow==2.8.1"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a workaround, users can avoid using the SparseTensorDenseAdd operation until they have updated to a patched version of TensorFlow. Alternatively, they can implement their own validation logic before calling the SparseTensorDenseAdd operation to ensure that the input arguments are properly validated.

Conclusion

The vulnerability in TensorFlow's SparseTensorDenseAdd operation (CVE-2022-29206) can have serious consequences if not addressed. It is recommended to update to one of the patched versions of TensorFlow to mitigate the risk. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

TensorFlow is an open-source machine learning framework developed by Google. It provides tools and resources for building and deploying machine learning models.

SparseTensorDenseAdd is a TensorFlow operation that combines a sparse tensor with a dense tensor.

The vulnerability can lead to crashes, memory corruption, or other unpredictable outcomes when certain input arguments are not properly validated.

To fix the vulnerability, update your TensorFlow installation to one of the patched versions: TensorFlow 2.6.4, TensorFlow 2.7.2, TensorFlow 2.8.1, or TensorFlow 2.9.0 (upcoming release).

As a workaround, you can avoid using the SparseTensorDenseAdd operation until you have updated to a patched version of TensorFlow.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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.6.4 2.6.4
    pip install --upgrade "tensorflow==2.6.4"
  • >= 2.7.0, < 2.7.2 2.7.2
    pip install --upgrade "tensorflow==2.7.2"
  • >= 2.8.0, < 2.8.1 2.8.1
    pip install --upgrade "tensorflow==2.8.1"

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