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.

Risk Assessment

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.

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
8.8 / 10
EPSS
0.3%
chance of exploitation in 30 days
Higher than 53% 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, CISA SSVC, EPSS, trickest/cve, and Nuclei templates.

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

Recommended Action

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.

CISA SSVC Assessment

Decision Track*
Exploitation poc
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 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.29%.

Technical Details

NVD Description

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)

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