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.

What is the risk?

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.

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
9.1 / 10
EPSS
0.4%
chance of exploitation in 30 days
Higher than 36% 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, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the 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

What should I do?

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.

What does CISA's SSVC say?

Decision Track
Exploitation none
Automatable No
Technical Impact total

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
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.45%.

What is the AI security impact?

Affected AI Architectures

model servingtraining pipelinesinference endpointsfederated learningMLOps pipelines

MITRE ATLAS Techniques

AML.T0010.001 AI Software
AML.T0025 Exfiltration via Cyber Means
AML.T0029 Denial of AI Service
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Article 15
ISO 42001: A.6.2
NIST AI RMF: MANAGE 2.2
OWASP LLM Top 10: LLM05

What are the technical details?

Original Advisory

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.

Weaknesses (CWE)

CWE-125 — Out-of-bounds Read: The product reads data past the end, or before the beginning, of the intended buffer.

  • [Implementation] Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylis
  • [Architecture and Design] Use a language that provides appropriate memory abstractions.

Source: MITRE CWE corpus.

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