CVE-2022-29208: TensorFlow: OOB write in EditDistance enables local DoS
HIGH PoC AVAILABLE CISA: TRACK*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 |
Do you use tensorflow? You're affected.
Severity & Risk
Attack Surface
Recommended Action
5 steps-
Patch: Upgrade TensorFlow to 2.9.0, 2.8.1, 2.7.2, or 2.6.4 per your current major version track.
-
Audit: Inventory all production and development TF versions with
pip show tensorflow | grep Version. -
Workaround: Add pre-execution validation to reject negative index values before invoking EditDistance ops; wrap calls in input sanitization layers.
-
Restrict: Limit user permissions to submit raw TF ops in shared JupyterHub or training platforms.
-
Detect: Monitor for unexpected SIGSEGV signals or abrupt process exits in TF serving and training job logs.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
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 References
- github.com/tensorflow/tensorflow/commit/30721cf564cb029d34535446d6a5a6357bebc8e7 Patch 3rd Party
- github.com/tensorflow/tensorflow/releases/tag/v2.6.4 Release 3rd Party
- github.com/tensorflow/tensorflow/releases/tag/v2.7.2 Release 3rd Party
- github.com/tensorflow/tensorflow/releases/tag/v2.8.1 Release 3rd Party
- github.com/tensorflow/tensorflow/releases/tag/v2.9.0 Release 3rd Party
- github.com/tensorflow/tensorflow/security/advisories/GHSA-2r2f-g8mw-9gvr Exploit Patch 3rd Party
- github.com/gclonly/im Exploit
Timeline
Related Vulnerabilities
CVE-2020-15196 9.9 TensorFlow: heap OOB read in sparse/ragged count ops
Same package: tensorflow CVE-2020-15205 9.8 TensorFlow: heap overflow in StringNGrams, ASLR bypass
Same package: tensorflow CVE-2020-15208 9.8 TFLite: OOB read/write via tensor dimension mismatch
Same package: tensorflow CVE-2019-16778 9.8 TensorFlow: heap overflow in UnsortedSegmentSum op
Same package: tensorflow CVE-2022-23587 9.8 TensorFlow: integer overflow in Grappler enables RCE
Same package: tensorflow
AI Threat Alert