CVE-2021-37688

7.8 HIGH

📋 TL;DR

This vulnerability allows attackers to craft malicious TFLite models that trigger a null pointer dereference in TensorFlow, causing a crash and denial of service. It affects TensorFlow users who process untrusted TFLite models, particularly in production ML inference systems.

💻 Affected Systems

Products:
  • TensorFlow
Versions: TensorFlow 2.3.0 to 2.5.0, plus earlier versions using TFLite
Operating Systems: All platforms running TensorFlow
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems processing TFLite models. TensorFlow installations not using TFLite are unaffected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service disruption through denial of service, potentially affecting critical ML inference pipelines and downstream applications.

🟠

Likely Case

Service crashes when processing malicious models, requiring restart and causing temporary unavailability.

🟢

If Mitigated

Minimal impact with proper input validation and model vetting procedures in place.

🌐 Internet-Facing: HIGH if accepting untrusted TFLite models from external sources.
🏢 Internal Only: MEDIUM if processing internally generated models, LOW with trusted sources only.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Attack requires ability to submit TFLite models to vulnerable systems. No authentication needed if model submission endpoint is exposed.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: TensorFlow 2.6.0, 2.5.1, 2.4.3, 2.3.4

Vendor Advisory: https://github.com/tensorflow/tensorflow/security/advisories/GHSA-vcjj-9vg7-vf68

Restart Required: Yes

Instructions:

1. Update TensorFlow to patched version using pip: pip install --upgrade tensorflow==2.6.0 2. Restart all TensorFlow services and applications 3. Verify fix by checking version: python -c 'import tensorflow as tf; print(tf.__version__)'

🔧 Temporary Workarounds

Input validation for TFLite models

all

Implement strict validation and sanitization of all incoming TFLite models before processing

Model source restriction

all

Only accept TFLite models from trusted, verified sources with cryptographic signatures

🧯 If You Can't Patch

  • Implement network segmentation to isolate TensorFlow services processing untrusted models
  • Deploy runtime protection tools to detect and block null pointer dereference attempts

🔍 How to Verify

Check if Vulnerable:

Check TensorFlow version: python -c 'import tensorflow as tf; print(tf.__version__)'. Versions 2.3.0-2.5.0 are vulnerable.

Check Version:

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

Verify Fix Applied:

Verify version is 2.6.0, 2.5.1, 2.4.3, or 2.3.4. Test with known safe TFLite models to ensure processing works.

📡 Detection & Monitoring

Log Indicators:

  • Segmentation fault or crash logs from TensorFlow processes
  • Abnormal termination of model inference services
  • Repeated model processing failures

Network Indicators:

  • Unusual spikes in model submission traffic
  • Requests with malformed TFLite model files

SIEM Query:

source="tensorflow" AND ("segmentation fault" OR "null pointer" OR "crash" OR "SIGSEGV")

🔗 References

📤 Share & Export