CVE-2022-35940: TensorFlow: integer overflow in RaggedRangeOp crashes service

HIGH
Published September 16, 2022
CISO Take

A remotely exploitable integer overflow in TensorFlow's RaggedRangeOp allows an unauthenticated attacker to crash any TF-based inference service by sending a crafted input with a very large float value. No authentication or privileges required — any exposed TF Serving endpoint or ML API is at risk. Patch to TF 2.10.0 (or cherrypick backports for 2.7.x–2.9.x) immediately; no workaround exists.

Risk Assessment

High risk for organizations exposing TensorFlow inference endpoints to untrusted inputs. CVSS 7.5 with network vector, low complexity, no privileges, no user interaction means automated exploitation is trivial. The abort signal (not just exception) makes recovery require process restart, amplifying DoS impact. Risk is reduced if TF is deployed behind input validation layers or in air-gapped training environments, but model serving APIs are frequently internet-facing.

Affected Systems

Package Ecosystem Vulnerable Range Patched
tensorflow pip No patch
195.0K OpenSSF 7.2 3.7K dependents Pushed 6d ago 4% patched ~1372d to patch Full package profile →

Do you use tensorflow? You're affected.

Severity & Risk

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

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

Recommended Action

6 steps
  1. PATCH

    Upgrade to TensorFlow 2.10.0 or apply backport commits to 2.9.1, 2.8.1, 2.7.2.

  2. VALIDATE INPUTS

    Enforce strict input bounds on float parameters before they reach RaggedRangeOp; reject values exceeding int64 max (~9.2e18).

  3. ISOLATE

    Run TF Serving in containers with restart policies (e.g., Docker restart=always) to auto-recover from crashes.

  4. MONITOR

    Alert on abnormal process restarts or SIGABRT signals in TF inference services.

  5. RATE LIMIT

    Apply request rate limiting on ML inference APIs to reduce DoS amplification.

  6. AUDIT

    Inventory all TF versions in production — check pip freeze or container image manifests.

CISA SSVC Assessment

Decision Track
Exploitation none
Automatable No
Technical Impact partial

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

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Article 9 - Risk management system
ISO 42001
8.4 - AI system operation and monitoring
NIST AI RMF
MANAGE-2.2 - Mechanisms to sustain the value of deployed AI
OWASP LLM Top 10
LLM04 - Model Denial of Service

Frequently Asked Questions

What is CVE-2022-35940?

A remotely exploitable integer overflow in TensorFlow's RaggedRangeOp allows an unauthenticated attacker to crash any TF-based inference service by sending a crafted input with a very large float value. No authentication or privileges required — any exposed TF Serving endpoint or ML API is at risk. Patch to TF 2.10.0 (or cherrypick backports for 2.7.x–2.9.x) immediately; no workaround exists.

Is CVE-2022-35940 actively exploited?

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

How to fix CVE-2022-35940?

1. PATCH: Upgrade to TensorFlow 2.10.0 or apply backport commits to 2.9.1, 2.8.1, 2.7.2. 2. VALIDATE INPUTS: Enforce strict input bounds on float parameters before they reach RaggedRangeOp; reject values exceeding int64 max (~9.2e18). 3. ISOLATE: Run TF Serving in containers with restart policies (e.g., Docker restart=always) to auto-recover from crashes. 4. MONITOR: Alert on abnormal process restarts or SIGABRT signals in TF inference services. 5. RATE LIMIT: Apply request rate limiting on ML inference APIs to reduce DoS amplification. 6. AUDIT: Inventory all TF versions in production — check pip freeze or container image manifests.

What systems are affected by CVE-2022-35940?

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

What is the CVSS score for CVE-2022-35940?

CVE-2022-35940 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.19%.

Technical Details

NVD Description

TensorFlow is an open source platform for machine learning. The `RaggedRangOp` function takes an argument `limits` that is eventually used to construct a `TensorShape` as an `int64`. If `limits` is a very large float, it can overflow when converted to an `int64`. This triggers an `InvalidArgument` but also throws an abort signal that crashes the program. We have patched the issue in GitHub commit 37cefa91bee4eace55715eeef43720b958a01192. The fix will be included in TensorFlow 2.10.0. We will also cherrypick this commit on TensorFlow 2.9.1, TensorFlow 2.8.1, and TensorFlow 2.7.2, as these are also affected and still in supported range. There are no known workarounds for this issue.

Exploitation Scenario

An adversary identifies a public REST API endpoint serving a TensorFlow model that accepts ragged tensor inputs (common in NLP or recommendation systems). They craft a JSON payload specifying a RaggedRange with `limits` set to a float near 1e30 — far exceeding int64 range. When TF processes the inference request, the overflow triggers an InvalidArgument followed by SIGABRT, crashing the TF Serving process. If no restart policy is configured, the inference service goes offline. A botnet could cycle through ML API endpoints using this as a cheap, unauthenticated service disruption tool against AI platforms.

Weaknesses (CWE)

CVSS Vector

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

Timeline

Published
September 16, 2022
Last Modified
November 21, 2024
First Seen
September 16, 2022

Related Vulnerabilities