CVE-2023-25672: TensorFlow Null Pointer Error in LookupTableImportV2

tensorflow Updated 02 Oct 2025

Summary

24/03/2023
Yes i
High
7.5

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

Also tracked for

The same CVE-2023-25672 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 developed by Google. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning models. TensorFlow is widely used in various domains, including research, industry, and academia. However, a vulnerability has been discovered in TensorFlow that can lead to a null pointer error in the LookupTableImportV2 function.

Vulnerability Detail

The vulnerability arises from the inability of the tf.raw_ops.LookupTableImportV2 function to handle scalars in the values parameter. When the values parameter contains a scalar value, the function throws a null pointer exception. This vulnerability can be exploited by an attacker to cause a denial of service (DoS) condition or potentially execute arbitrary code. The impact of this vulnerability is considered high, with a CVSS score of 7.5.

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 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==2.11.1"

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

Workaround

As a workaround, users can avoid passing scalar values in the values parameter of the LookupTableImportV2 function. Instead, they should pass an array or a tensor containing the desired values. Here's an example of the modified code:

import tensorflow as tf

v = tf.Variable(1)

@tf.function(jit_compile=True)
def test():
   func = tf.raw_ops.LookupTableImportV2
   para={'table_handle': v.handle,'keys': [62.98910140991211, 94.36528015136719], 'values': [-919]}

   y = func(**para)
   return y

print(test())

Conclusion

The vulnerability in TensorFlow's LookupTableImportV2 function has been addressed in the latest patches. Users are advised to update their TensorFlow installation to version 2.11.1 or later to mitigate the risk. For further support on vulnerability remediation, please 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.

The vulnerability can lead to a null pointer error in the LookupTableImportV2 function, potentially causing a denial of service or arbitrary code execution.

To fix the vulnerability, update your TensorFlow installation to version 2.11.1 or later.

Yes, you can avoid passing scalar values in the values parameter of the LookupTableImportV2 function. Instead, pass an array or a tensor containing the desired values.

This vulnerability was reported by r3pwnx of 360 AIVul Team.

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 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==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