CVE-2022-35967: TensorFlow Segfault Vulnerability in QuantizedAdd Function

tensorflow Updated 18 Jul 2026

Summary

13/07/2026
Yes i
Moderate
5.9

CVE-2022-35967: TensorFlow vulnerable to segfault in QuantizedAdd. 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-35967 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 architecture for deploying computation across various platforms. However, certain operations, such as QuantizedAdd, can lead to vulnerabilities if not handled correctly, particularly when dealing with tensor ranks.

Vulnerability Detail

The vulnerability arises in the QuantizedAdd operation when it is provided with min_input or max_input tensors that have a nonzero rank. This can lead to a segmentation fault (segfault), which can be exploited to perform a denial of service attack. The issue is particularly concerning as it can crash applications using TensorFlow, impacting their availability and reliability.

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 temporary workaround, avoid using the QuantizedAdd operation with min_input or max_input tensors that have a nonzero rank. Here is an example of code that triggers the vulnerability:

import tensorflow as tf

Toutput = tf.qint32 x = tf.constant(140, shape=[1], dtype=tf.quint8) y = tf.constant(26, shape=[10], dtype=tf.quint8) min_x = tf.constant([], shape=[0], dtype=tf.float32) max_x = tf.constant(0, shape=[], dtype=tf.float32) min_y = tf.constant(0, shape=[], dtype=tf.float32) max_y = tf.constant(0, shape=[], dtype=tf.float32) tf.raw_ops.QuantizedAdd(x=x, y=y, min_x=min_x, max_x=max_x, min_y=min_y, max_y=max_y, Toutput=Toutput)

Conclusion

The CVE-2022-35967 vulnerability in TensorFlow's QuantizedAdd operation poses a significant risk by potentially allowing denial of service attacks. Users are encouraged to update to the latest version of TensorFlow to mitigate this risk and ensure application stability.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

CVE-2022-35967 is a vulnerability in TensorFlow that can cause a segmentation fault when using the QuantizedAdd operation with improperly shaped tensors.

Exploiting this vulnerability can lead to a denial of service, crashing applications that utilize TensorFlow.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

TensorFlow versions prior to 2.10.0, as well as 2.9.0, 2.8.0, and 2.7.2, are affected by this vulnerability.

You can update TensorFlow to the patched version by running the command 'pip install --upgrade tensorflow'.

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