CVE-2022-23570: TensorFlow Null-Dereference Vulnerability

tensorflow-cpu Updated 02 Oct 2025

Summary

04/02/2022
Yes i
Unrated
Not published

CVE-2022-23570: Tensorflow is an Open Source Machine Learning Framework. Affects tensorflow-cpu across 3 version ranges.

< 2.5.3 >= 2.6.0, < 2.6.3 < 8a513cec4bec15961fbfdedcaa5376522980455c

Fixed in 2.5.3 or 2.6.3, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2022-23570 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 widely used for developing and deploying machine learning models. It provides a comprehensive ecosystem of tools, libraries, and resources for building and training neural networks. TensorFlow supports various platforms and programming languages, making it a popular choice among developers and researchers in the field of artificial intelligence. However, a vulnerability has been discovered in TensorFlow that can lead to a null-dereference error when decoding a tensor from protobuf.

Vulnerability Detail

The vulnerability in TensorFlow arises when attributes of mutable arguments to certain operations are missing from the protobuf. This can result in a null-dereference error during the decoding process. In production builds, where the DCHECK guard is a no-op, the execution proceeds to dereference the null pointer, potentially causing unexpected behavior or crashes. In debug builds, the DCHECK assertion failure leads to a crash. The impact of this vulnerability can range from data corruption to denial of service. The issue has been identified and fixed in TensorFlow 2.8.0, with backports to TensorFlow 2.7.1 and 2.6.3.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-cpu==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.5.3 2.5.3
    pip install --upgrade "tensorflow-cpu==2.5.3"
  • >= 2.6.0, < 2.6.3 2.6.3
    pip install --upgrade "tensorflow-cpu==2.6.3"

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, developers can manually check and ensure that all attributes of mutable arguments to operations are present in the protobuf before decoding the tensor. This can be achieved by validating the protobuf structure and handling missing attributes appropriately. Here is an example code snippet demonstrating the workaround:

import tensorflow as tf
from tensorflow.core.framework import tensor_pb2

def decode_protobuf(protobuf_data):
    tensor_proto = tensor_pb2.TensorProto()
    tensor_proto.ParseFromString(protobuf_data)
    if not tensor_proto.attr:
        # Handle missing attributes
        ...
    tensor = tf.make_tensor_proto(tensor_proto)
    ...

Conclusion

The null-dereference vulnerability in TensorFlow can have serious consequences, including data corruption and denial of service. It is crucial to update TensorFlow to the fixed versions or apply the provided patches to mitigate these risks. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow-cpu →

Share this vulnerability

FAQ

TensorFlow is an open-source machine learning framework used for developing and deploying machine learning models. It provides a comprehensive ecosystem of tools and resources for building neural networks.

A null-dereference vulnerability occurs when a program attempts to access or dereference a null pointer, leading to unexpected behavior or crashes.

The vulnerability in TensorFlow arises when attributes of mutable arguments to certain operations are missing from the protobuf, resulting in a null-dereference error during tensor decoding.

The vulnerability can lead to data corruption, unexpected behavior, or denial of service if exploited. It is important to update TensorFlow to the fixed versions to mitigate these risks.

To fix the vulnerability, update TensorFlow to version 2.8.0 or apply the respective patches for TensorFlow 2.7.1 and 2.6.3. Ensure all dependencies and associated libraries are also updated.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow-cpu.

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-cpu==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.5.3 2.5.3
    pip install --upgrade "tensorflow-cpu==2.5.3"
  • >= 2.6.0, < 2.6.3 2.6.3
    pip install --upgrade "tensorflow-cpu==2.6.3"

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