CVE-2023-25670: TensorFlow CPU Null Pointer Error in QuantizedMatMulWithBiasAndDequantize

tensorflow-cpu Updated 18 Jul 2026

Summary

13/07/2026
Yes i
High
7.5

CVE-2023-25670: TensorFlow has Null Pointer Error in QuantizedMatMulWithBiasAndDequantize. Affects tensorflow-cpu versions < 2.11.1. Fixed in 2.11.1. How to fix ↓

Also tracked for

The same CVE-2023-25670 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

TensorFlow is an open-source machine learning framework widely used for building and training deep learning models. It provides a comprehensive ecosystem for developing applications that require complex mathematical computations. The TensorFlow CPU package is specifically designed for environments where GPU acceleration is not available. This package includes various operations, including quantized matrix multiplication, which optimizes performance for low-precision data types. However, a recent vulnerability has been identified in the QuantizedMatMulWithBiasAndDequantize operation, which can lead to a null pointer error under certain conditions.

Vulnerability Detail

The vulnerability arises from a null pointer error (NPE) in the QuantizedMatMulWithBiasAndDequantize function when using the MKL (Math Kernel Library) feature. This can occur when specific parameters are passed to the function, leading to potential crashes or unexpected behavior in applications utilizing this operation. The issue is particularly concerning as it may affect the stability and reliability of machine learning models that rely on this functionality, potentially causing data loss or corruption during processing.

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 version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.11.1

This is the first release that contains the fix.

pip install --upgrade "tensorflow-cpu==2.11.1"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can avoid using the QuantizedMatMulWithBiasAndDequantize function with the specific parameters that trigger the null pointer error. Here is an example of how to modify the parameters to prevent the error:

import tensorflow as tf

func = tf.raw_ops.QuantizedMatMulWithBiasAndDequantize
para = {
    'a': tf.constant(138, dtype=tf.quint8),
    'b': tf.constant(4, dtype=tf.qint8),
    'bias': [[31.81644630432129, 47.21876525878906], [109.95201110839844, 152.07968139648438]],
    'min_a': 141.5337138686371,
    'max_a': [73.84139251708984, 173.15280151367188],
    'min_b': [],
    'max_b': [[16.128345489501953, 193.26820373535156]],
    'min_freezed_output': [],
    'max_freezed_output': [115.50032806396484, 156.974853515625],
    'Toutput': 1.0,
    'transpose_a': True,
    'transpose_b': False,
    'input_quant_mode': 'MIN_FIRST'
}

# Modify parameters to avoid NPE
# Ensure min_b and min_freezed_output are set appropriately
func(**para)

Conclusion

The identified vulnerability in TensorFlow CPU's QuantizedMatMulWithBiasAndDequantize function poses a risk of null pointer errors, which can affect application stability. It is crucial to update to the patched version 2.11.1 or later to mitigate this risk. Additionally, users can implement workarounds to avoid triggering the error until they can update.

See every vulnerability recorded for tensorflow-cpu →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 7.5, indicating a high severity level.

The vulnerability affects TensorFlow CPU versions prior to 2.11.1.

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

This vulnerability was reported by a user identified as r3pwnx.

Yes, TensorFlow has a security guide available at https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md for more information on their security model.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow-cpu.

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 version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.11.1

This is the first release that contains the fix.

pip install --upgrade "tensorflow-cpu==2.11.1"

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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