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.

What is the risk?

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.

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.8%
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, 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, 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 does CISA's SSVC say?

Decision Attend
Exploitation poc
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.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.82%.

What is the AI security impact?

Affected AI Architectures

model servingtraining pipelinesML platform multi-tenant environmentsnotebook/interactive compute environments

MITRE ATLAS Techniques

AML.T0010.001 AI Software
AML.T0040 AI Model Inference API Access
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Article 15
ISO 42001: A.6.2.6
NIST AI RMF: MANAGE 2.4
OWASP LLM Top 10: LLM05:2025

What are the technical details?

Original Advisory

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)

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: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