CVE-2022-23573: TensorFlow: uninitialized memory in AssignOp

HIGH PoC AVAILABLE CISA: TRACK*
Published February 4, 2022
CISO Take

TensorFlow's AssignOp copies uninitialized heap memory into output tensors, exploitable over the network with only low privileges and no user interaction. Any shared model serving endpoint or multi-tenant ML platform accepting user-submitted computation graphs is exposed. Patch to TF 2.8.0, 2.7.1, 2.6.3, or 2.5.3 immediately and restrict untrusted graph execution in the interim.

What is the risk?

High risk (CVSS 8.8) for organizations running TensorFlow model serving, interactive ML notebook platforms, or any environment where authenticated users can submit computation graphs. The combination of network accessibility, low attack complexity, and low privilege requirements means any legitimate API user can attempt exploitation—no specialized ML knowledge required. Undefined behavior (CWE-908) may manifest as memory disclosure, silent model state corruption, or inference worker crashes, all of which are difficult to detect without active monitoring.

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
8.8 / 10
EPSS
0.7%
chance of exploitation in 30 days
Higher than 50% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
Exploitation Confidence
medium
CISA SSVC: Public PoC
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 Low
UI None
S Unchanged
C High
I High
A High

What should I do?

5 steps
  1. Patch: upgrade to TensorFlow 2.8.0, 2.7.1, 2.6.3, or 2.5.3 per your branch.

  2. Workaround if patching is delayed: restrict computation graph submission to fully trusted internal identities; disable or sandbox user-defined op execution.

  3. Harden inference workers: deploy TF Serving in rootless containers with seccomp/AppArmor profiles to limit blast radius of memory corruption.

  4. Audit: inventory all public or semi-public TF Serving endpoints and confirm patch status.

  5. Detection: monitor for anomalous crashes, OOM events, or unexpected NaN/garbage outputs from TF inference workers; validate critical model outputs against known-good baselines; alert on repeated undefined behavior signals in TF logs.

What does CISA's SSVC say?

Decision Track*
Exploitation poc
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
A.6.2 - AI Risk Assessment A.9.3 - AI System Performance and Integrity Monitoring
NIST AI RMF
MANAGE-2.2 - AI Risk Response and Treatment
OWASP LLM Top 10
LLM03:2025 - Supply Chain Vulnerabilities

Frequently Asked Questions

What is CVE-2022-23573?

TensorFlow's AssignOp copies uninitialized heap memory into output tensors, exploitable over the network with only low privileges and no user interaction. Any shared model serving endpoint or multi-tenant ML platform accepting user-submitted computation graphs is exposed. Patch to TF 2.8.0, 2.7.1, 2.6.3, or 2.5.3 immediately and restrict untrusted graph execution in the interim.

Is CVE-2022-23573 actively exploited?

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

How to fix CVE-2022-23573?

1. Patch: upgrade to TensorFlow 2.8.0, 2.7.1, 2.6.3, or 2.5.3 per your branch. 2. Workaround if patching is delayed: restrict computation graph submission to fully trusted internal identities; disable or sandbox user-defined op execution. 3. Harden inference workers: deploy TF Serving in rootless containers with seccomp/AppArmor profiles to limit blast radius of memory corruption. 4. Audit: inventory all public or semi-public TF Serving endpoints and confirm patch status. 5. Detection: monitor for anomalous crashes, OOM events, or unexpected NaN/garbage outputs from TF inference workers; validate critical model outputs against known-good baselines; alert on repeated undefined behavior signals in TF logs.

What systems are affected by CVE-2022-23573?

This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, ML inference APIs, shared ML platforms, notebook environments.

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

CVE-2022-23573 has a CVSS v3.1 base score of 8.8 (HIGH). The EPSS exploitation probability is 0.74%.

What is the AI security impact?

Affected AI Architectures

model servingtraining pipelinesML inference APIsshared ML platformsnotebook environments

MITRE ATLAS Techniques

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

Compliance Controls Affected

EU AI Act: Article 15
ISO 42001: A.6.2, A.9.3
NIST AI RMF: MANAGE-2.2
OWASP LLM Top 10: LLM03:2025

What are the technical details?

Original Advisory

Tensorflow is an Open Source Machine Learning Framework. The implementation of `AssignOp` can result in copying uninitialized data to a new tensor. This later results in undefined behavior. The implementation has a check that the left hand side of the assignment is initialized (to minimize number of allocations), but does not check that the right hand side is also initialized. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.

Exploitation Scenario

An adversary with a low-privilege account on a shared ML inference platform crafts a TensorFlow computation graph that invokes AssignOp where the right-hand side tensor is allocated but never initialized. The graph is submitted via the standard inference API. During execution, the TF runtime copies uninitialized heap memory into the destination tensor and returns it as model output. The attacker reads the raw tensor bytes from the API response, potentially exfiltrating heap contents from adjacent allocations—which in a busy inference server may include model weight buffers, other users' input batches, or cached authentication tokens. In a less targeted variant, the adversary repeatedly triggers the vulnerability to crash inference workers, causing a sustained denial-of-service against the ML serving layer.

Weaknesses (CWE)

CWE-908 — Use of Uninitialized Resource: The product uses or accesses a resource that has not been initialized.

  • [Implementation] Explicitly initialize the resource before use. If this is performed through an API function or standard procedure, follow all required steps.
  • [Implementation] Pay close attention to complex conditionals that affect initialization, since some branches might not perform the initialization.

Source: MITRE CWE corpus.

CVSS Vector

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

Timeline

Published
February 4, 2022
Last Modified
November 21, 2024
First Seen
February 4, 2022

Related Vulnerabilities