CVE-2022-29205: TensorFlow: NULL deref DoS via compat.v1 ops

MEDIUM PoC AVAILABLE CISA: TRACK*
Published May 20, 2022
CISO Take

A local attacker with minimal privileges can crash any TensorFlow process by invoking legacy tf.compat.v1 ops that lack quantized type support, triggering a NULL pointer dereference. Patch immediately to TF 2.9.0, 2.8.1, 2.7.2, or 2.6.4 — the fix is straightforward and patches are available. The local-only attack vector limits blast radius, but multi-tenant ML platforms (shared Jupyter/Colab environments, MLOps pipelines with user-submitted code) are meaningfully exposed.

Risk Assessment

Moderate operational risk for AI/ML teams. CVSS 5.5 reflects the local attack vector, which prevents remote exploitation and limits exposure. However, in multi-tenant ML development environments — shared notebook servers, training clusters with multiple users, or inference services that accept user-provided model code — a low-privileged user can reliably crash the TF runtime with a trivial one-liner. The vulnerability is in the legacy compatibility shim (tf.compat.v1), meaning older codebases and migration-phase projects are disproportionately exposed. No active exploitation in the wild; not in CISA KEV.

Affected Systems

Package Ecosystem Vulnerable Range Patched
tensorflow pip No patch
195.0K OpenSSF 7.2 3.7K dependents Pushed 6d ago 4% patched ~1372d to patch Full package profile →

Do you use tensorflow? You're affected.

Severity & Risk

CVSS 3.1
5.5 / 10
EPSS
0.1%
chance of exploitation in 30 days
Higher than 18% 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 Local
AC Low
PR Low
UI None
S Unchanged
C None
I None
A High

Recommended Action

5 steps
  1. PATCH

    Upgrade TensorFlow to 2.9.0, 2.8.1, 2.7.2, or 2.6.4 depending on your pinned version. Patch is available via pip: pip install tensorflow>=2.9.0.

  2. WORKAROUND (if patching is blocked): Audit codebases for tf.compat.v1 usage and restrict which ops are called; avoid quantized type operations via the compat.v1 API.

  3. ISOLATION

    In multi-tenant environments (JupyterHub, shared training servers), ensure user-submitted code runs in isolated containers or with process-level sandboxing so a crash does not affect other tenants.

  4. MONITORING

    Alert on unexpected TF process crashes (SIGABRT/SIGSEGV from tensorflow processes) in serving infrastructure as potential abuse indicators.

  5. INVENTORY

    Identify all ML services running TF versions < 2.6.4 using your software asset inventory.

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:

ISO 42001
8.4 - AI system operation and monitoring
NIST AI RMF
GOVERN-1.7 - Processes for decommissioning AI systems MANAGE-2.2 - Mechanisms to sustain AI risk management

Frequently Asked Questions

What is CVE-2022-29205?

A local attacker with minimal privileges can crash any TensorFlow process by invoking legacy tf.compat.v1 ops that lack quantized type support, triggering a NULL pointer dereference. Patch immediately to TF 2.9.0, 2.8.1, 2.7.2, or 2.6.4 — the fix is straightforward and patches are available. The local-only attack vector limits blast radius, but multi-tenant ML platforms (shared Jupyter/Colab environments, MLOps pipelines with user-submitted code) are meaningfully exposed.

Is CVE-2022-29205 actively exploited?

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

How to fix CVE-2022-29205?

1. PATCH: Upgrade TensorFlow to 2.9.0, 2.8.1, 2.7.2, or 2.6.4 depending on your pinned version. Patch is available via pip: `pip install tensorflow>=2.9.0`. 2. WORKAROUND (if patching is blocked): Audit codebases for tf.compat.v1 usage and restrict which ops are called; avoid quantized type operations via the compat.v1 API. 3. ISOLATION: In multi-tenant environments (JupyterHub, shared training servers), ensure user-submitted code runs in isolated containers or with process-level sandboxing so a crash does not affect other tenants. 4. MONITORING: Alert on unexpected TF process crashes (SIGABRT/SIGSEGV from tensorflow processes) in serving infrastructure as potential abuse indicators. 5. INVENTORY: Identify all ML services running TF versions < 2.6.4 using your software asset inventory.

What systems are affected by CVE-2022-29205?

This vulnerability affects the following AI/ML architecture patterns: training pipelines, model serving, inference.

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

CVE-2022-29205 has a CVSS v3.1 base score of 5.5 (MEDIUM). The EPSS exploitation probability is 0.06%.

Technical Details

NVD Description

TensorFlow is an open source platform for machine learning. Prior to versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4, there is a potential for segfault / denial of service in TensorFlow by calling `tf.compat.v1.*` ops which don't yet have support for quantized types, which was added after migration to TensorFlow 2.x. In these scenarios, since the kernel is missing, a `nullptr` value is passed to `ParseDimensionValue` for the `py_value` argument. Then, this is dereferenced, resulting in segfault. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.

Exploitation Scenario

An attacker with local access to a shared ML training server (e.g., a data scientist on a multi-user JupyterHub or a malicious insider on an MLOps platform) imports TensorFlow and calls a tf.compat.v1 op that internally lacks quantized type kernel support. The missing kernel causes a nullptr to be passed to ParseDimensionValue, which immediately dereferences it, generating a SIGSEGV and terminating the TF process. On a shared inference server, this kills active model serving for all users. On a training cluster, it aborts long-running GPU jobs. The attack requires no special knowledge — a one-line Python call is sufficient — and is 100% reliable on vulnerable versions.

Weaknesses (CWE)

CVSS Vector

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

Timeline

Published
May 20, 2022
Last Modified
November 21, 2024
First Seen
May 20, 2022

Related Vulnerabilities