Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2022-35982: CWE-20: Improper Input Validation in tensorflow tensorflow

0
Medium
Published: Fri Sep 16 2022 (09/16/2022, 21:30:13 UTC)
Source: CVE
Vendor/Project: tensorflow
Product: tensorflow

Description

TensorFlow is an open source platform for machine learning. If `SparseBincount` is given inputs for `indices`, `values`, and `dense_shape` that do not make a valid sparse tensor, it results in a segfault that can be used to trigger a denial of service attack. We have patched the issue in GitHub commit 40adbe4dd15b582b0210dfbf40c243a62f5119fa. The fix will be included in TensorFlow 2.10.0. We will also cherrypick this commit on TensorFlow 2.9.1, TensorFlow 2.8.1, and TensorFlow 2.7.2, as these are also affected and still in supported range. There are no known workarounds for this issue.

AI-Powered Analysis

AILast updated: 06/22/2025, 19:50:55 UTC

Technical Analysis

CVE-2022-35982 is a vulnerability in TensorFlow, an open-source machine learning platform widely used for developing and deploying machine learning models. The issue arises from improper input validation (CWE-20) in the SparseBincount operation, which processes sparse tensors represented by three inputs: indices, values, and dense_shape. If these inputs do not form a valid sparse tensor, the operation triggers a segmentation fault (segfault), causing the TensorFlow process to crash. This behavior can be exploited to launch a denial of service (DoS) attack by feeding malformed inputs to the SparseBincount function, thereby disrupting machine learning workflows or services relying on TensorFlow. The vulnerability affects TensorFlow versions prior to 2.7.2, versions 2.8.0 up to but not including 2.8.1, and versions 2.9.0 up to but not including 2.9.1. The issue was patched in GitHub commit 40adbe4dd15b582b0210dfbf40c243a62f5119fa and incorporated into TensorFlow 2.10.0, with backports to 2.7.2, 2.8.1, and 2.9.1. No known workarounds exist, and no exploits have been observed in the wild. The vulnerability specifically impacts the availability of TensorFlow services by causing crashes but does not directly compromise confidentiality or integrity. Exploitation requires the ability to supply crafted inputs to the SparseBincount API, which may be possible in environments where untrusted data is processed or where users can submit inputs to machine learning pipelines using TensorFlow. The vulnerability is medium severity due to its limited impact scope and the requirement for specific input conditions to trigger the fault.

Potential Impact

For European organizations, the primary impact of CVE-2022-35982 is the potential disruption of machine learning services and applications that utilize vulnerable TensorFlow versions. Organizations relying on TensorFlow for critical AI workloads, such as financial institutions using ML for fraud detection, healthcare providers employing AI for diagnostics, or manufacturing firms leveraging predictive maintenance, could experience service outages or degraded performance if an attacker supplies malformed inputs. This could lead to operational downtime, loss of productivity, and potential financial losses. Since the vulnerability causes a denial of service rather than data leakage or code execution, the risk to confidentiality and integrity is low. However, availability disruptions in AI-driven systems could indirectly affect decision-making processes and service delivery. The lack of known exploits reduces immediate risk, but the widespread use of TensorFlow in European research institutions, technology companies, and industrial sectors means that unpatched systems remain vulnerable. Additionally, environments that accept external or user-generated data for ML processing are more susceptible to exploitation. The absence of workarounds necessitates timely patching to mitigate risk.

Mitigation Recommendations

European organizations should prioritize upgrading TensorFlow installations to version 2.10.0 or later, or apply the backported patches available in versions 2.7.2, 2.8.1, and 2.9.1. Since no workarounds exist, patch management is the primary defense. Organizations should audit their ML pipelines to identify any use of SparseBincount or sparse tensor operations and assess whether these are exposed to untrusted inputs. Implementing input validation and sanitization at the application layer before data reaches TensorFlow can reduce the risk of malformed inputs causing crashes. Additionally, deploying runtime monitoring and anomaly detection to identify unusual TensorFlow process terminations can help detect exploitation attempts. For environments where patching is delayed, isolating TensorFlow services and restricting access to trusted users or systems can limit exposure. Incorporating fuzz testing focused on sparse tensor inputs during development and testing phases can proactively identify similar issues. Finally, maintaining an inventory of TensorFlow versions in use across the organization and integrating vulnerability scanning into CI/CD pipelines will help ensure timely detection and remediation of such vulnerabilities.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2022-07-15T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d9845c4522896dcbf40c8

Added to database: 5/21/2025, 9:09:25 AM

Last enriched: 6/22/2025, 7:50:55 PM

Last updated: 2/7/2026, 8:50:01 PM

Views: 41

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats