CVE-2023-25674: TensorFlow GPU Null Pointer Error in RandomShuffle with XLA Enabled

tensorflow-gpu Updated 07 Jul 2026

Summary

07/07/2026
Yes i
High
7.5

CVE-2023-25674: TensorFlow has Null Pointer Error in RandomShuffle with XLA enable. Affects tensorflow-gpu versions < 2.11.1. Fixed in 2.11.1. How to fix ↓

Also tracked for

The same CVE-2023-25674 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 library widely used for various applications, including deep learning and neural networks. The 'tensorflow-gpu' package allows users to leverage GPU acceleration for improved performance. However, like any software, TensorFlow is susceptible to vulnerabilities that can impact its functionality and security. This particular vulnerability arises in the RandomShuffle operation when XLA (Accelerated Linear Algebra) is enabled, potentially leading to application crashes or unexpected behavior.

Vulnerability Detail

The vulnerability identified as CVE-2023-25674 is a Null Pointer Error (NPE) that occurs in the RandomShuffle function when XLA is enabled. This issue can be triggered by providing specific parameters, such as a large value for 'value' and negative integers for 'seed' and 'seed2'. The NPE can cause the application to crash, leading to denial of service and potentially exposing sensitive data if the application is compromised. The technical details indicate that the error originates from improper handling of input parameters within the TensorFlow library.

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, users can avoid using the RandomShuffle function with the problematic parameters. Here is an example of how to modify the parameters to prevent the NPE:

import tensorflow as tf

func = tf.raw_ops.RandomShuffle
para = {'value': [1, 2, 3, 4, 5], 'seed': 42, 'seed2': 42}

@tf.function(jit_compile=True)
def test():
   y = func(**para)
   return y

test()

Conclusion

The CVE-2023-25674 vulnerability in TensorFlow's RandomShuffle function poses a significant risk due to the potential for application crashes. Users are advised to update to the latest version of 'tensorflow-gpu' to mitigate this issue. Additionally, utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for tensorflow-gpu →

Share this vulnerability

FAQ

CVE-2023-25674 is a vulnerability in TensorFlow's RandomShuffle function that can lead to a Null Pointer Error when XLA is enabled.

This vulnerability can cause your application to crash, leading to denial of service and potential exposure of sensitive data.

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

Update your 'tensorflow-gpu' package to version 2.11.1 or later using 'pip install --upgrade tensorflow-gpu'.

Yes, you can modify the parameters used in the RandomShuffle function to avoid triggering the Null Pointer Error.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow-gpu.

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.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 →

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