CVE-2022-35996: TensorFlow Denial of Service Vulnerability in Conv2D

tensorflow Updated 18 Jul 2026

Summary

13/07/2026
Yes i
Moderate
5.9

CVE-2022-35996: TensorFlow vulnerable to floating point exception in Conv2D. Affects tensorflow across 3 version ranges.

< 2.7.2 >= 2.8.0, < 2.8.1 >= 2.9.0, < 2.9.1

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

Also tracked for

The same CVE-2022-35996 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 open-source machine learning library developed by Google, widely used for building and training machine learning models. It provides a flexible ecosystem of tools, libraries, and community resources that allows researchers and developers to create and deploy machine learning applications. However, TensorFlow has a vulnerability in its Conv2D operation, which can lead to a denial of service if not addressed.

Vulnerability Detail

The vulnerability arises when the Conv2D function is provided with an empty input tensor while the filter and padding sizes are valid. This results in an output of all zeros, leading to division-by-zero floating point exceptions. Such exceptions can be exploited to trigger denial of service attacks, potentially disrupting services that rely on TensorFlow for processing.

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.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"
  • >= 2.9.0, < 2.9.1 2.9.1
    pip install --upgrade "tensorflow==2.9.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, ensure that the input tensor to the Conv2D operation is not empty. Here is an example of how to check the input before calling Conv2D:

import tensorflow as tf import numpy as np

input = np.ones([1, 0, 2, 1]) # Example of an empty input if input.shape[1] > 0: filter = np.ones([1, 1, 1, 1]) strides = [1, 1, 1, 1] padding = 'EXPLICIT' explicit_paddings = [0, 0, 1, 1, 1, 1, 0, 0] data_format = 'NHWC' res = tf.raw_ops.Conv2D( input=input, filter=filter, strides=strides, padding=padding, explicit_paddings=explicit_paddings, data_format=data_format,

    )

else: print('Input tensor is empty, skipping Conv2D operation.')

Conclusion

The CVE-2022-35996 vulnerability in TensorFlow's Conv2D operation poses a risk of denial of service due to floating point exceptions when empty input tensors are used. Users are advised to update to the latest patched versions or implement workarounds to mitigate the risk.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

CVE-2022-35996 is a vulnerability in TensorFlow's Conv2D operation that can lead to denial of service due to floating point exceptions when provided with an empty input tensor.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Check your application against the vulnerability using the Vulert playground without any signup.

The affected versions include TensorFlow 2.7.0 to 2.9.0. The vulnerability has been patched in TensorFlow 2.10.0 and also in 2.9.1, 2.8.1, and 2.7.2.

As a temporary workaround, ensure that the input tensor to the Conv2D operation is not empty to avoid triggering the vulnerability.

The CVSS score for this vulnerability is 5.9, indicating a moderate severity level.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

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.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"
  • >= 2.9.0, < 2.9.1 2.9.1
    pip install --upgrade "tensorflow==2.9.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