CVE-2021-41208

8.8 HIGH

📋 TL;DR

This vulnerability in TensorFlow's boosted trees implementation allows attackers to trigger denial of service, exploit undefined behavior, and potentially read/write heap buffers. It affects all users of TensorFlow's boosted trees APIs. The boosted trees implementation is unmaintained and will be deprecated.

💻 Affected Systems

Products:
  • TensorFlow
Versions: TensorFlow 2.4.0 to 2.6.0, and earlier versions using boosted trees APIs
Operating Systems: All platforms running TensorFlow
Default Config Vulnerable: ✅ No
Notes: Only vulnerable if using TensorFlow's boosted trees APIs. Many TensorFlow deployments may not use these specific APIs.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise through arbitrary code execution via heap buffer manipulation, leading to data theft or system takeover.

🟠

Likely Case

Denial of service through application crashes from null pointer dereferences or CHECK-failures, disrupting machine learning workflows.

🟢

If Mitigated

No impact if boosted trees APIs are not used or if systems are properly patched/isolated.

🌐 Internet-Facing: MEDIUM - Exploitation requires API access but could affect exposed ML services using vulnerable TensorFlow versions.
🏢 Internal Only: MEDIUM - Internal ML pipelines using boosted trees could be disrupted by malicious insiders or compromised accounts.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires calling vulnerable boosted trees APIs with malicious inputs. No public exploit code has been released.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: TensorFlow 2.7.0, with backports to 2.6.1, 2.5.2, and 2.4.4

Vendor Advisory: https://github.com/tensorflow/tensorflow/security/advisories/GHSA-57wx-m983-2f88

Restart Required: Yes

Instructions:

1. Update TensorFlow to version 2.7.0 or later. 2. If using older versions, update to patched versions: 2.6.1, 2.5.2, or 2.4.4. 3. Restart all services using TensorFlow.

🔧 Temporary Workarounds

Disable Boosted Trees APIs

all

Remove or disable usage of TensorFlow's boosted trees APIs in your codebase

# Review and remove tf.boosted_trees.* API calls from your code

Network Isolation

all

Restrict network access to systems running vulnerable TensorFlow versions

# Use firewall rules to limit access to TensorFlow services

🧯 If You Can't Patch

  • Immediately stop using TensorFlow's boosted trees APIs in all applications
  • Implement strict input validation and sanitization for all TensorFlow API calls

🔍 How to Verify

Check if Vulnerable:

Check TensorFlow version and review code for boosted trees API usage: import tensorflow as tf; print(tf.__version__); search code for 'tf.boosted_trees'

Check Version:

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

Verify Fix Applied:

Verify TensorFlow version is 2.7.0 or higher, or one of the patched versions (2.6.1, 2.5.2, 2.4.4)

📡 Detection & Monitoring

Log Indicators:

  • Application crashes with null pointer exceptions
  • CHECK-failure messages in TensorFlow logs
  • Unusual memory access patterns

Network Indicators:

  • Unexpected requests to boosted trees endpoints
  • Abnormal traffic patterns to ML inference services

SIEM Query:

source="tensorflow.logs" AND ("nullptr" OR "CHECK-failure" OR "boosted_trees")

🔗 References

📤 Share & Export