CVE-2023-33976: TensorFlow: DoS via upper_bound rank validation crash

HIGH
Published July 30, 2024
CISO Take

An unauthenticated remote attacker can crash any TensorFlow service that processes user-supplied tensors through array_ops.upper_bound by sending a non-rank-2 tensor, causing an immediate segfault and service disruption. If your organization exposes TensorFlow inference endpoints to untrusted input, this is exploitable with trivial effort. Patch to TensorFlow 2.12 (cherrypick) or 2.13+ immediately; add tensor shape validation at API boundaries as a defense-in-depth measure.

What is the risk?

Risk is HIGH for externally-exposed TensorFlow serving infrastructure. The CVSS vector (AV:N/AC:L/PR:N/UI:N) means no authentication, no special knowledge, and network-accessible — a script-kiddie can trigger this. Impact is availability only (no data exfiltration), but crashing a production inference service can cascade into business disruption. Not in CISA KEV and no confirmed active exploitation, which reduces urgency slightly. Organizations running TensorFlow behind authentication layers or with strict input validation have materially lower exposure.

What systems are affected?

Package Ecosystem Vulnerable Range Patched
TensorFlow pip No patch
195.8K OpenSSF 7.1 3.7K dependents Pushed 3d ago 4% patched ~1372d to patch Full package profile →

Do you use TensorFlow? You're affected.

How severe is it?

CVSS 3.1
7.5 / 10
EPSS
0.4%
chance of exploitation in 30 days
Higher than 28% of all CVEs
Exploitation Status
No known exploitation
Sophistication
Trivial

What is the attack surface?

AV AC PR UI S C I A
AV Network
AC Low
PR None
UI None
S Unchanged
C None
I None
A High

What should I do?

5 steps
  1. PATCH

    Upgrade to TensorFlow 2.13+ or apply the cherry-pick to TensorFlow 2.12 (commits 6fa05df and 915884f).

  2. VALIDATE

    Add explicit tensor rank checks before any call to array_ops.upper_bound — assert input.shape.rank == 2.

  3. ISOLATE

    Run TensorFlow serving processes with resource limits (ulimits, cgroups) to contain crash blast radius and enable auto-restart.

  4. MONITOR

    Alert on abnormal segfault/OOM kill rates in model serving containers — repeated crashes pattern may indicate active probing.

  5. HARDEN

    Deploy input schema validation (shape, dtype, rank) at API gateway layer before requests reach TensorFlow runtime.

What does CISA's SSVC say?

Decision Track
Exploitation none
Automatable No
Technical Impact partial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

EU AI Act
Article 15 - Accuracy, robustness and cybersecurity
ISO 42001
8.4 - AI system operation
NIST AI RMF
MANAGE 2.2 - Mechanisms to sustain AI system performance and reliability
OWASP LLM Top 10
LLM04 - Model Denial of Service

Frequently Asked Questions

What is CVE-2023-33976?

An unauthenticated remote attacker can crash any TensorFlow service that processes user-supplied tensors through array_ops.upper_bound by sending a non-rank-2 tensor, causing an immediate segfault and service disruption. If your organization exposes TensorFlow inference endpoints to untrusted input, this is exploitable with trivial effort. Patch to TensorFlow 2.12 (cherrypick) or 2.13+ immediately; add tensor shape validation at API boundaries as a defense-in-depth measure.

Is CVE-2023-33976 actively exploited?

No confirmed active exploitation of CVE-2023-33976 has been reported, but organizations should still patch proactively.

How to fix CVE-2023-33976?

1. PATCH: Upgrade to TensorFlow 2.13+ or apply the cherry-pick to TensorFlow 2.12 (commits 6fa05df and 915884f). 2. VALIDATE: Add explicit tensor rank checks before any call to array_ops.upper_bound — assert input.shape.rank == 2. 3. ISOLATE: Run TensorFlow serving processes with resource limits (ulimits, cgroups) to contain crash blast radius and enable auto-restart. 4. MONITOR: Alert on abnormal segfault/OOM kill rates in model serving containers — repeated crashes pattern may indicate active probing. 5. HARDEN: Deploy input schema validation (shape, dtype, rank) at API gateway layer before requests reach TensorFlow runtime.

What systems are affected by CVE-2023-33976?

This vulnerability affects the following AI/ML architecture patterns: model serving, inference APIs, training pipelines, custom ML ops.

What is the CVSS score for CVE-2023-33976?

CVE-2023-33976 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.36%.

What is the AI security impact?

Affected AI Architectures

model servinginference APIstraining pipelinescustom ML ops

MITRE ATLAS Techniques

AML.T0029 Denial of AI Service
AML.T0034 Cost Harvesting
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Article 15
ISO 42001: 8.4
NIST AI RMF: MANAGE 2.2
OWASP LLM Top 10: LLM04

What are the technical details?

Original Advisory

TensorFlow is an end-to-end open source platform for machine learning. `array_ops.upper_bound` causes a segfault when not given a rank 2 tensor. The fix will be included in TensorFlow 2.13 and will also cherrypick this commit on TensorFlow 2.12.

Exploitation Scenario

An adversary targeting an organization's AI-powered product (e.g., an ML inference API for fraud detection or image classification) sends a crafted HTTP request to the model serving endpoint with a rank-1 tensor payload instead of the expected rank-2 input. TensorFlow's array_ops.upper_bound dereferences an invalid memory address, triggering a segfault that crashes the serving process. If the service auto-restarts, the adversary can loop requests to maintain a persistent DoS condition at negligible cost. No authentication, no ML knowledge, and no exploit code is needed — only a malformed tensor shape.

Weaknesses (CWE)

CWE-190 — Integer Overflow or Wraparound: The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.

  • [Requirements] Ensure that all protocols are strictly defined, such that all out-of-bounds behavior can be identified simply, and require strict conformance to the protocol.
  • [Requirements] Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. If possible, choose a language or compiler that performs automatic bounds checking.

Source: MITRE CWE corpus.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Timeline

Published
July 30, 2024
Last Modified
November 21, 2024
First Seen
July 30, 2024

Related Vulnerabilities