CVE-2022-29207: TensorFlow: null-ptr deref in eager mode causes DoS
MEDIUM PoC AVAILABLE CISA: TRACK*A local, low-privileged user can crash TensorFlow processes by passing empty resource handles to multiple TF operations in eager mode (default in TF 2.x), causing null pointer dereference. Impact is limited to availability—no data exfiltration—but shared ML infrastructure (JupyterHub, multi-tenant notebooks, ML pipelines) is most at risk. Patch to TF 2.9.0, 2.8.1, 2.7.2, or 2.6.4 immediately; the fix is straightforward and patches are available.
What is the risk?
Severity is medium (CVSS 5.5) with local access required and low privileges needed, constraining the attack surface. However, TensorFlow's ubiquity in ML stacks makes unpatched deployments common. The highest organizational risk is in multi-tenant ML platforms where unprivileged users share compute—a bad actor or compromised notebook can disrupt training jobs or serving processes without needing admin rights. No confidentiality or integrity impact; this is a pure availability issue.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| TensorFlow | pip | — | No patch |
Do you use TensorFlow? You're affected.
How severe is it?
What is the attack surface?
What should I do?
5 steps-
Upgrade TensorFlow to 2.9.0, 2.8.1, 2.7.2, or 2.6.4—patches are available for all active release branches.
-
Audit your ML environment inventory: scan for pinned TF versions (pip freeze | grep tensorflow) across JupyterHub, training clusters, and CI runners.
-
Enforce input validation on resource handles in custom TF operations as a defense-in-depth measure.
-
In multi-tenant ML platforms, restrict who can execute arbitrary TF code until patched.
-
Monitor for unexpected TF process crashes as a detection signal—repeated crashes may indicate active exploitation attempts.
What does CISA's SSVC say?
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:
Frequently Asked Questions
What is CVE-2022-29207?
A local, low-privileged user can crash TensorFlow processes by passing empty resource handles to multiple TF operations in eager mode (default in TF 2.x), causing null pointer dereference. Impact is limited to availability—no data exfiltration—but shared ML infrastructure (JupyterHub, multi-tenant notebooks, ML pipelines) is most at risk. Patch to TF 2.9.0, 2.8.1, 2.7.2, or 2.6.4 immediately; the fix is straightforward and patches are available.
Is CVE-2022-29207 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-29207, increasing the risk of exploitation.
How to fix CVE-2022-29207?
1. Upgrade TensorFlow to 2.9.0, 2.8.1, 2.7.2, or 2.6.4—patches are available for all active release branches. 2. Audit your ML environment inventory: scan for pinned TF versions (pip freeze | grep tensorflow) across JupyterHub, training clusters, and CI runners. 3. Enforce input validation on resource handles in custom TF operations as a defense-in-depth measure. 4. In multi-tenant ML platforms, restrict who can execute arbitrary TF code until patched. 5. Monitor for unexpected TF process crashes as a detection signal—repeated crashes may indicate active exploitation attempts.
What systems are affected by CVE-2022-29207?
This vulnerability affects the following AI/ML architecture patterns: training pipelines, model serving, inference, model development environments.
What is the CVSS score for CVE-2022-29207?
CVE-2022-29207 has a CVSS v3.1 base score of 5.5 (MEDIUM). The EPSS exploitation probability is 0.32%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001 AI Software AML.T0029 Denial of AI Service AML.T0049 Exploit Public-Facing Application Compliance Controls Affected
What are the technical details?
Original Advisory
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, multiple TensorFlow operations misbehave in eager mode when the resource handle provided to them is invalid. In graph mode, it would have been impossible to perform these API calls, but migration to TF 2.x eager mode opened up this vulnerability. If the resource handle is empty, then a reference is bound to a null pointer inside TensorFlow codebase (various codepaths). This is undefined behavior. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.
Exploitation Scenario
An adversary with low-privilege access to a shared JupyterHub environment submits a malicious notebook that iterates through TensorFlow eager-mode operations, passing empty resource handles (e.g., tf.raw_ops functions accepting resource tensors). Each call triggers undefined behavior via null pointer dereference, crashing the TensorFlow process. In a shared training cluster, this disrupts co-located users' training jobs, forces expensive job restarts, and could be used to degrade SLA on a production ML inference service that restarts on crash.
Weaknesses (CWE)
CWE-20 — Improper Input Validation: The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
- [Architecture and Design] Consider using language-theoretic security (LangSec) techniques that characterize inputs using a formal language and build "recognizers" for that language. This effectively requires parsing to be a distinct layer that effectively enforces a boundary between raw input and internal data representations, instead of allowing parser code to be scattered throughout the program, where it could be subject to errors or inconsistencies that create weaknesses. [REF-1109] [REF-1110] [REF-1111]
- [Architecture and Design] Use an input validation framework such as Struts or the OWASP ESAPI Validation API. Note that using a framework does not automatically address all input validation problems; be mindful of weaknesses that could arise from misusing the framework itself (CWE-1173).
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H References
- github.com/tensorflow/tensorflow/commit/a5b89cd68c02329d793356bda85d079e9e69b4e7 Patch 3rd Party
- github.com/tensorflow/tensorflow/commit/dbdd98c37bc25249e8f288bd30d01e118a7b4498 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-5wpj-c6f7-24x8 Exploit Patch 3rd Party
- github.com/ARPSyndicate/cvemon Exploit
- github.com/skipfuzz/skipfuzz 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