CVE-2023-25672: TensorFlow GPU Null Pointer Error in LookupTableImportV2
Summary
CVE-2023-25672: TensorFlow has Null Pointer Error in LookupTableImportV2. Affects tensorflow-gpu versions < 2.11.1. Fixed in 2.11.1. How to fix ↓
Also tracked for
- tensorflow · PyPI
- tensorflow-cpu · PyPI
- tensorflow · Bitnami
- tensorflow · PyPI
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.
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.
No signup required · Results in about 60 seconds
Background
TensorFlow is an open-source machine learning framework widely used for building and training machine learning models. It provides a comprehensive ecosystem for developing deep learning applications, including support for various hardware accelerators like GPUs. TensorFlow's flexibility and scalability make it a popular choice among researchers and developers. However, like any software, it is susceptible to vulnerabilities that can affect its functionality and security.
Vulnerability Detail
The vulnerability identified as CVE-2023-25672 occurs in the TensorFlow function tf.raw_ops.LookupTableImportV2. This function fails to handle scalar values in the 'values' parameter, leading to a Null Pointer Exception (NPE). When this function is invoked with a scalar value instead of an expected array, it can cause the application to crash, potentially leading to denial of service. This vulnerability can be exploited by attackers to disrupt services that rely on TensorFlow for machine learning tasks.
How To Fix
Latest published version: 2.12.0 as of 22 Oct 2026
pip install --upgrade "tensorflow-gpu==2.12.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-gpu==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, ensure that the 'values' parameter passed to the tf.raw_ops.LookupTableImportV2 function is always an array and not a scalar. For example, modify the code as follows:
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 ]} # Changed to an array
y = func(**para)
return y
print(test())
Conclusion
CVE-2023-25672 is a significant vulnerability in TensorFlow that can lead to application crashes due to improper handling of scalar values in a specific function. Users are encouraged to update to the latest version to mitigate this risk. Additionally, temporary workarounds can be implemented to avoid the issue until an update can be applied.
See every vulnerability recorded for tensorflow-gpu →
FAQ
CVE-2023-25672 is a vulnerability in TensorFlow that causes a Null Pointer Exception when the tf.raw_ops.LookupTableImportV2 function is called with a scalar value in the 'values' parameter.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.
The CVSS score for this vulnerability is 7.5, indicating a high severity level that could lead to significant disruptions.
If you cannot update to the patched version, ensure that you pass an array to the 'values' parameter in the LookupTableImportV2 function to avoid triggering the Null Pointer Exception.
This vulnerability was reported by r3pwnx of the 360 AIVul Team.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.