CVE-2022-41902: TensorFlow Grappler: OOB read/crash via crafted model

CRITICAL PoC AVAILABLE
Published December 6, 2022
CISO Take

CVE-2022-41902 is a CVSS 9.1 memory vulnerability in TensorFlow's Grappler graph optimizer, exploitable over the network with zero authentication. Any TensorFlow Serving deployment or training pipeline accepting external model inputs is at risk of process crash or memory disclosure. Patch immediately to TF 2.11.0, 2.10.1, 2.9.3, or 2.8.4, and restrict network access to inference endpoints as a compensating control.

Risk Assessment

Critical. CVSS 9.1 (AV:N/AC:L/PR:N/UI:N) means trivial remote exploitation with no authentication barrier. The Grappler graph optimization layer executes on both training and inference paths, widening the blast radius across the entire ML stack. The C:H score indicates memory disclosure risk — process memory could expose model weights, training data fragments, or in-memory API secrets. Not currently in CISA KEV, but the low complexity and zero-privilege requirement make opportunistic exploitation realistic against exposed endpoints.

Affected Systems

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

Do you use tensorflow? You're affected.

Severity & Risk

CVSS 3.1
9.1 / 10
EPSS
0.3%
chance of exploitation in 30 days
Higher than 51% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Moderate
Exploitation Confidence
medium
Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, CISA SSVC, EPSS, trickest/cve, and Nuclei templates.

Attack Surface

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

Recommended Action

6 steps
  1. Patch TensorFlow to 2.11.0, or cherry-pick commit a65411a1 for supported branches (2.8.4, 2.9.3, 2.10.1).

  2. Network-segment TensorFlow Serving gRPC/REST endpoints — restrict to trusted internal CIDRs only.

  3. Implement model graph validation and sanitization before Grappler optimization runs on externally-supplied models.

  4. Deploy process isolation and sandboxing for inference workloads to limit blast radius of memory disclosure.

  5. Monitor serving processes for anomalous crash patterns, OOM events, or restart loops as exploitation indicators.

  6. Audit cloud-managed TF deployments (Vertex AI, SageMaker) to confirm automatic patching status.

CISA SSVC Assessment

Decision Track
Exploitation none
Automatable No
Technical Impact total

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 15 - Accuracy, robustness and cybersecurity
ISO 42001
A.6.2 - AI system security
NIST AI RMF
MANAGE 2.2 - Treatment of AI Risks
OWASP LLM Top 10
LLM05 - Supply Chain Vulnerabilities

Frequently Asked Questions

What is CVE-2022-41902?

CVE-2022-41902 is a CVSS 9.1 memory vulnerability in TensorFlow's Grappler graph optimizer, exploitable over the network with zero authentication. Any TensorFlow Serving deployment or training pipeline accepting external model inputs is at risk of process crash or memory disclosure. Patch immediately to TF 2.11.0, 2.10.1, 2.9.3, or 2.8.4, and restrict network access to inference endpoints as a compensating control.

Is CVE-2022-41902 actively exploited?

Proof-of-concept exploit code is publicly available for CVE-2022-41902, increasing the risk of exploitation.

How to fix CVE-2022-41902?

1. Patch TensorFlow to 2.11.0, or cherry-pick commit a65411a1 for supported branches (2.8.4, 2.9.3, 2.10.1). 2. Network-segment TensorFlow Serving gRPC/REST endpoints — restrict to trusted internal CIDRs only. 3. Implement model graph validation and sanitization before Grappler optimization runs on externally-supplied models. 4. Deploy process isolation and sandboxing for inference workloads to limit blast radius of memory disclosure. 5. Monitor serving processes for anomalous crash patterns, OOM events, or restart loops as exploitation indicators. 6. Audit cloud-managed TF deployments (Vertex AI, SageMaker) to confirm automatic patching status.

What systems are affected by CVE-2022-41902?

This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, inference endpoints, federated learning, MLOps pipelines.

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

CVE-2022-41902 has a CVSS v3.1 base score of 9.1 (CRITICAL). The EPSS exploitation probability is 0.28%.

Technical Details

NVD Description

TensorFlow is an open source platform for machine learning. The function MakeGrapplerFunctionItem takes arguments that determine the sizes of inputs and outputs. If the inputs given are greater than or equal to the sizes of the outputs, an out-of-bounds memory read or a crash is triggered. We have patched the issue in GitHub commit a65411a1d69edfb16b25907ffb8f73556ce36bb7. The fix will be included in TensorFlow 2.11.0. We will also cherrypick this commit on TensorFlow 2.8.4, 2.9.3, and 2.10.1.

Exploitation Scenario

An adversary crafts a malicious TensorFlow SavedModel where MakeGrapplerFunctionItem receives function items whose input count equals or exceeds the declared output sizes. They submit this model to a public-facing TensorFlow Serving gRPC endpoint (common in ML-as-a-service deployments). During Grappler's graph optimization pass, the OOB read triggers — either crashing the serving pod (effective DoS against the AI service) or returning adjacent process memory to the attacker, potentially leaking model weights, in-memory API credentials, or fragments of recently processed inference data. In federated learning scenarios where participants submit model updates, this vector is especially dangerous as the malicious artifact bypasses typical input validation.

CVSS Vector

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

Timeline

Published
December 6, 2022
Last Modified
November 21, 2024
First Seen
December 6, 2022

Related Vulnerabilities