CVE-2022-23574: TensorFlow: heap OOB read/write enables network RCE

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

A typo in TensorFlow's type specialization logic allows heap out-of-bounds read and write, reachable over the network by any low-privileged user — effectively a remote code execution primitive in any publicly exposed TF serving endpoint. Patch to TensorFlow 2.8.0, 2.7.1, or 2.6.3 immediately. If patching is blocked, isolate TensorFlow inference endpoints behind authentication and network controls.

Risk Assessment

CVSS 8.8 with network vector and low privileges required makes this exploitable by any authenticated API user — including multi-tenant ML platform users or model submission endpoints. The heap corruption primitive (both read and write) is a strong foundation for RCE. No CISA KEV listing suggests no confirmed active exploitation as of publication, but the vulnerability class and a public PoC reference in the advisory lower the bar significantly. Risk is HIGH for organizations running exposed TensorFlow serving infrastructure.

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
Moderate
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, or 2.6.3 — the fix is commit 0657c83d.

  2. NETWORK CONTROLS

    Restrict TensorFlow inference APIs to authenticated, authorized internal networks only.

  3. INPUT VALIDATION

    Reject externally submitted model graphs or tensor operations until patched.

  4. DETECTION

    Monitor for heap corruption indicators (crashes, SIGABRT, ASAN alerts) in TF serving processes; review audit logs for anomalous graph submission activity.

  5. INVENTORY

    Audit all TF version deployments — CI/CD build containers and notebooks are common overlooked surfaces.

CISA SSVC Assessment

Decision Attend
Exploitation poc
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.6 - Information security in AI system development and operation
NIST AI RMF
MANAGE 2.4 - Residual risks are monitored and managed
OWASP LLM Top 10
LLM05:2025 - Insecure Output Handling / Supply Chain Vulnerabilities

Frequently Asked Questions

What is CVE-2022-23574?

A typo in TensorFlow's type specialization logic allows heap out-of-bounds read and write, reachable over the network by any low-privileged user — effectively a remote code execution primitive in any publicly exposed TF serving endpoint. Patch to TensorFlow 2.8.0, 2.7.1, or 2.6.3 immediately. If patching is blocked, isolate TensorFlow inference endpoints behind authentication and network controls.

Is CVE-2022-23574 actively exploited?

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

How to fix CVE-2022-23574?

1. PATCH: Upgrade to TensorFlow 2.8.0, 2.7.1, or 2.6.3 — the fix is commit 0657c83d. 2. NETWORK CONTROLS: Restrict TensorFlow inference APIs to authenticated, authorized internal networks only. 3. INPUT VALIDATION: Reject externally submitted model graphs or tensor operations until patched. 4. DETECTION: Monitor for heap corruption indicators (crashes, SIGABRT, ASAN alerts) in TF serving processes; review audit logs for anomalous graph submission activity. 5. INVENTORY: Audit all TF version deployments — CI/CD build containers and notebooks are common overlooked surfaces.

What systems are affected by CVE-2022-23574?

This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, ML platform multi-tenant environments, notebook/interactive compute environments.

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

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

Technical Details

NVD Description

Tensorflow is an Open Source Machine Learning Framework. There is a typo in TensorFlow's `SpecializeType` which results in heap OOB read/write. Due to a typo, `arg` is initialized to the `i`th mutable argument in a loop where the loop index is `j`. Hence it is possible to assign to `arg` from outside the vector of arguments. Since this is a mutable proto value, it allows both read and write to outside of bounds data. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, and TensorFlow 2.6.3, as these are also affected and still in supported range.

Exploitation Scenario

An adversary with legitimate low-privilege access to a multi-tenant ML platform (e.g., an internal model registry or shared TF Serving endpoint) crafts a model graph containing a tensor operation that triggers the `SpecializeType` loop bug. The off-by-one iterator causes `arg` to reference memory outside the mutable arguments vector. The attacker uses the heap read primitive to leak memory layout and defeat ASLR, then uses the heap write primitive to overwrite a function pointer or return address, achieving arbitrary code execution on the ML serving node. From there, lateral movement to training infrastructure, model storage, or data pipelines follows.

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