CVE-2022-29208: TensorFlow: OOB write in EditDistance enables local DoS

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

A low-privileged local attacker can crash TensorFlow processes by passing negative index values to tf.raw_ops.EditDistance, exploiting missing lower-bound array validation (CWE-787 Out-of-Bounds Write). Upgrade to TF 2.9.0, 2.8.1, 2.7.2, or 2.6.4 immediately. Risk is highest in shared ML platforms where users can submit arbitrary TF operations against shared training or inference infrastructure.

Risk Assessment

CVSS 7.1 (High) with local attack vector limits remote exploitation. However, the low privilege requirement and low complexity make this trivially exploitable by any user with TF execution access. In shared ML environments—JupyterHub, managed training platforms, model serving clusters—this enables a disruptive DoS against training jobs and inference servers. The CWE-787 OOB write also carries theoretical code execution potential beyond DoS, though practical exploitation beyond crash has not been confirmed. Not in CISA KEV; no evidence of active in-the-wild exploitation.

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
7.1 / 10
EPSS
0.1%
chance of exploitation in 30 days
Higher than 33% 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 High
A High

Recommended Action

5 steps
  1. Patch: Upgrade TensorFlow to 2.9.0, 2.8.1, 2.7.2, or 2.6.4 per your current major version track.

  2. Audit: Inventory all production and development TF versions with pip show tensorflow | grep Version.

  3. Workaround: Add pre-execution validation to reject negative index values before invoking EditDistance ops; wrap calls in input sanitization layers.

  4. Restrict: Limit user permissions to submit raw TF ops in shared JupyterHub or training platforms.

  5. Detect: Monitor for unexpected SIGSEGV signals or abrupt process exits in TF serving and training job 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.6 - AI system security testing
NIST AI RMF
MANAGE 2.2 - Mechanisms to sustain oversight of deployed AI
OWASP LLM Top 10
LLM05:2025 - Supply Chain Vulnerabilities

Frequently Asked Questions

What is CVE-2022-29208?

A low-privileged local attacker can crash TensorFlow processes by passing negative index values to tf.raw_ops.EditDistance, exploiting missing lower-bound array validation (CWE-787 Out-of-Bounds Write). Upgrade to TF 2.9.0, 2.8.1, 2.7.2, or 2.6.4 immediately. Risk is highest in shared ML platforms where users can submit arbitrary TF operations against shared training or inference infrastructure.

Is CVE-2022-29208 actively exploited?

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

How to fix CVE-2022-29208?

1. Patch: Upgrade TensorFlow to 2.9.0, 2.8.1, 2.7.2, or 2.6.4 per your current major version track. 2. Audit: Inventory all production and development TF versions with `pip show tensorflow | grep Version`. 3. Workaround: Add pre-execution validation to reject negative index values before invoking EditDistance ops; wrap calls in input sanitization layers. 4. Restrict: Limit user permissions to submit raw TF ops in shared JupyterHub or training platforms. 5. Detect: Monitor for unexpected SIGSEGV signals or abrupt process exits in TF serving and training job logs.

What systems are affected by CVE-2022-29208?

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

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

CVE-2022-29208 has a CVSS v3.1 base score of 7.1 (HIGH). The EPSS exploitation probability is 0.14%.

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, the implementation of `tf.raw_ops.EditDistance` has incomplete validation. Users can pass negative values to cause a segmentation fault based denial of service. In multiple places throughout the code, one may compute an index for a write operation. However, the existing validation only checks against the upper bound of the array. Hence, it is possible to write before the array by massaging the input to generate negative values for `loc`. 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 low-privilege access to a shared ML training platform or JupyterHub instance crafts a TF computation graph invoking tf.raw_ops.EditDistance with carefully chosen negative values for the `loc` index parameter. When the graph is executed, the missing lower-bound check causes an out-of-bounds write that triggers a segfault, immediately terminating the TF process. On a shared training cluster, this aborts long-running distributed training jobs and corrupts in-progress checkpoints. If TF Serving is deployed with an EditDistance-based model and accepts external tensor inputs, an unauthenticated remote attacker could chain this to crash the serving process, causing service outage.

Weaknesses (CWE)

CVSS Vector

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

Timeline

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

Related Vulnerabilities