CVE-2023-25676

7.5 HIGH

📋 TL;DR

This vulnerability in TensorFlow allows a denial of service attack through a null pointer dereference in the ParallelConcat operation when using XLA compilation. It affects users running TensorFlow versions prior to 2.12.0 and 2.11.1 with XLA enabled. The issue causes segmentation faults when processing malformed input tensors.

💻 Affected Systems

Products:
  • TensorFlow
Versions: All versions prior to 2.12.0 and 2.11.1
Operating Systems: All operating systems running TensorFlow
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when XLA (Accelerated Linear Algebra) compilation is enabled and tf.raw_ops.ParallelConcat is called with invalid shape parameters.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service disruption through segmentation fault crashes, potentially leading to availability issues in production ML systems.

🟠

Likely Case

Denial of service through application crashes when processing specially crafted input with XLA compilation enabled.

🟢

If Mitigated

No impact if XLA is disabled or proper input validation is implemented before reaching vulnerable code paths.

🌐 Internet-Facing: MEDIUM - Exploitable if ML models accept untrusted input and use XLA compilation, but requires specific conditions.
🏢 Internal Only: MEDIUM - Internal ML pipelines could be disrupted if processing malformed data with vulnerable configurations.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: NO
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires ability to call tf.raw_ops.ParallelConcat with malformed shape parameter and XLA enabled.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: TensorFlow 2.12.0 or 2.11.1

Vendor Advisory: https://github.com/tensorflow/tensorflow/security/advisories/GHSA-6wfh-89q8-44jq

Restart Required: Yes

Instructions:

1. Upgrade TensorFlow to version 2.12.0 or 2.11.1 using pip: 'pip install --upgrade tensorflow==2.12.0' or 'pip install --upgrade tensorflow==2.11.1'. 2. Restart all TensorFlow applications and services. 3. Verify the update was successful.

🔧 Temporary Workarounds

Disable XLA compilation

all

Prevent exploitation by disabling XLA compilation which is required for the vulnerability to be triggered

export TF_XLA_FLAGS="--tf_xla_auto_jit=0"
os.environ['TF_XLA_FLAGS'] = '--tf_xla_auto_jit=0'

Input validation for ParallelConcat

all

Add validation to ensure shape parameter rank is greater than zero before calling ParallelConcat

# Python code to validate shape before use
if shape is not None and len(shape) > 0:
    # Proceed with ParallelConcat
else:
    # Handle invalid shape appropriately

🧯 If You Can't Patch

  • Disable XLA compilation globally in your TensorFlow environment
  • Implement strict input validation for all calls to tf.raw_ops.ParallelConcat operations

🔍 How to Verify

Check if Vulnerable:

Check TensorFlow version and verify if XLA is enabled in your configuration

Check Version:

python -c "import tensorflow as tf; print(tf.__version__)"

Verify Fix Applied:

Verify TensorFlow version is 2.12.0 or 2.11.1 and test ParallelConcat with edge cases

📡 Detection & Monitoring

Log Indicators:

  • Segmentation fault errors in application logs
  • TensorFlow crash reports mentioning ParallelConcat
  • XLA compilation errors with null pointer references

Network Indicators:

  • Unusual spikes in service failures when processing ML inference requests

SIEM Query:

source="*tensorflow*" AND ("segmentation fault" OR "null pointer" OR "ParallelConcat")

🔗 References

📤 Share & Export