CVE-2022-29206: TensorFlow: SparseTensorDenseAdd null ptr deref DoS
MEDIUM PoC AVAILABLE CISA: TRACK*This medium-severity TensorFlow flaw allows any local user with low privileges to crash the ML runtime by submitting malformed SparseTensorDenseAdd inputs, triggering a null pointer dereference. No data exfiltration or code execution is possible, but disruption to training jobs and inference workers is trivially achievable. Patch to TF 2.6.4, 2.7.2, 2.8.1, or 2.9.0+ immediately, with priority on shared multi-tenant ML environments where untrusted users can submit tensor operations.
What is the risk?
Medium risk in isolated single-tenant deployments; elevated in shared or multi-tenant ML infrastructure. CVSS 5.5 reflects local-only access and pure availability impact. Exploitability is trivial—low complexity, low privilege, no user interaction required. The undefined behavior from binding a reference to nullptr consistently manifests as a process crash. No evidence of active exploitation or weaponized PoC in the wild as of disclosure. Risk increases proportionally with the number of users sharing a TensorFlow environment.
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-
Patch: Upgrade TensorFlow to 2.6.4, 2.7.2, 2.8.1, or 2.9.0+—patches available at the linked GitHub releases.
-
Input validation: Implement shape and index bounds validation for sparse tensors at API ingestion boundaries before passing to kernel ops.
-
Access control: Restrict raw ops API access (tf.raw_ops) to authenticated and authorized internal users only; do not expose it in public-facing inference endpoints.
-
Process isolation: Run TF inference workers in separate processes or containers so a single crash does not cascade to the full serving fleet.
-
Detection: Alert on unexpected SIGSEGV or abnormal TF process termination events in ML serving infrastructure logs.
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-29206?
This medium-severity TensorFlow flaw allows any local user with low privileges to crash the ML runtime by submitting malformed SparseTensorDenseAdd inputs, triggering a null pointer dereference. No data exfiltration or code execution is possible, but disruption to training jobs and inference workers is trivially achievable. Patch to TF 2.6.4, 2.7.2, 2.8.1, or 2.9.0+ immediately, with priority on shared multi-tenant ML environments where untrusted users can submit tensor operations.
Is CVE-2022-29206 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-29206, increasing the risk of exploitation.
How to fix CVE-2022-29206?
1. Patch: Upgrade TensorFlow to 2.6.4, 2.7.2, 2.8.1, or 2.9.0+—patches available at the linked GitHub releases. 2. Input validation: Implement shape and index bounds validation for sparse tensors at API ingestion boundaries before passing to kernel ops. 3. Access control: Restrict raw ops API access (tf.raw_ops) to authenticated and authorized internal users only; do not expose it in public-facing inference endpoints. 4. Process isolation: Run TF inference workers in separate processes or containers so a single crash does not cascade to the full serving fleet. 5. Detection: Alert on unexpected SIGSEGV or abnormal TF process termination events in ML serving infrastructure logs.
What systems are affected by CVE-2022-29206?
This vulnerability affects the following AI/ML architecture patterns: training pipelines, model serving, shared ML compute environments, Jupyter/notebook environments.
What is the CVSS score for CVE-2022-29206?
CVE-2022-29206 has a CVSS v3.1 base score of 5.5 (MEDIUM). The EPSS exploitation probability is 0.34%.
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, the implementation of `tf.raw_ops.SparseTensorDenseAdd` does not fully validate the input arguments. In this case, a reference gets bound to a `nullptr` during kernel execution. 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 attacker with access to a shared TensorFlow training cluster—common in academic or enterprise ML platforms—submits a crafted tf.raw_ops.SparseTensorDenseAdd call where sparse indices and dense shape dimensions are deliberately mismatched. The kernel attempts to bind a reference to a null pointer during execution, triggering undefined behavior that immediately crashes the TF process. In a Jupyter notebook server scenario, this terminates the kernel, aborting co-located users' training runs. In a model serving context with raw ops exposed, a single malformed HTTP request crashes the inference worker, causing a service outage until process restart. No special AI/ML expertise required beyond basic TensorFlow op knowledge.
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/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/core/kernels/sparse_tensor_dense_add_op.cc 3rd Party
- github.com/tensorflow/tensorflow/commit/11ced8467eccad9c7cb94867708be8fa5c66c730 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-rc9w-5c64-9vqq 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