CVE-2022-29198: CWE-20: Improper Input Validation in tensorflow tensorflow
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.SparseTensorToCSRSparseMatrix` does not fully validate the input arguments. This results in a `CHECK`-failure which can be used to trigger a denial of service attack. The code assumes `dense_shape` is a vector and `indices` is a matrix (as part of requirements for sparse tensors) but there is no validation for this. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.
AI Analysis
Technical Summary
CVE-2022-29198 is a medium severity vulnerability in TensorFlow, an open-source machine learning platform widely used for developing and deploying machine learning models. The vulnerability arises from improper input validation in the implementation of the function tf.raw_ops.SparseTensorToCSRSparseMatrix. Specifically, the function assumes that the input argument 'dense_shape' is a vector and 'indices' is a matrix, as required for sparse tensor representations. However, prior to TensorFlow versions 2.6.4, 2.7.2, 2.8.1, and 2.9.0, there was no enforcement or validation to confirm these assumptions. This lack of validation can cause the program to hit a CHECK failure, which is an internal assertion failure in TensorFlow's codebase. Such a failure can be deliberately triggered by an attacker supplying malformed inputs, resulting in a denial of service (DoS) condition where the TensorFlow process crashes or terminates unexpectedly. The vulnerability does not appear to allow for code execution, privilege escalation, or data leakage, but it can disrupt availability of services relying on TensorFlow. The issue has been patched in the specified versions, so upgrading to TensorFlow 2.6.4, 2.7.2, 2.8.1, or 2.9.0 or later mitigates the risk. There are no known exploits in the wild, and exploitation requires supplying crafted inputs to the vulnerable function, which may require some level of access to the TensorFlow environment or the ability to influence input data to machine learning pipelines using this function.
Potential Impact
For European organizations, the primary impact of this vulnerability is on the availability of machine learning services and applications that utilize affected TensorFlow versions. Organizations relying on TensorFlow for critical AI workloads, data analytics, or automated decision-making could experience service interruptions if an attacker triggers the denial of service condition. This could affect sectors such as finance, healthcare, manufacturing, and telecommunications where AI models are integrated into operational workflows. Although the vulnerability does not directly compromise confidentiality or integrity, the disruption of AI services could lead to operational delays, loss of productivity, and potential financial losses. Additionally, organizations providing AI-as-a-service or cloud-based machine learning platforms could face reputational damage if customers experience outages. Since TensorFlow is widely adopted in research institutions and enterprises across Europe, the scope of affected systems is significant, especially in environments where input data is not strictly sanitized or controlled. However, exploitation requires the ability to supply malicious inputs to the vulnerable function, which may limit the attack surface to internal or semi-trusted users or systems.
Mitigation Recommendations
1. Upgrade TensorFlow to a patched version: Organizations should prioritize upgrading to TensorFlow versions 2.6.4, 2.7.2, 2.8.1, 2.9.0, or later to ensure the vulnerability is remediated. 2. Input validation and sanitization: Implement strict validation of input data before it reaches TensorFlow functions, especially for sparse tensor inputs. Enforce schema checks to ensure 'dense_shape' is a vector and 'indices' is a matrix as expected. 3. Restrict access to ML pipelines: Limit the ability to supply inputs to TensorFlow processing pipelines to trusted users and systems only, reducing the risk of malicious input injection. 4. Monitor and alert on TensorFlow crashes: Deploy monitoring to detect unexpected TensorFlow process terminations or CHECK failures, enabling rapid incident response. 5. Use containerization or sandboxing: Run TensorFlow workloads in isolated environments to contain potential denial of service impacts and prevent cascading failures in larger systems. 6. Conduct security reviews of ML workflows: Regularly audit machine learning pipelines for input validation weaknesses and ensure secure coding practices are followed when integrating TensorFlow operations.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Belgium, Italy, Spain, Poland
CVE-2022-29198: CWE-20: Improper Input Validation in tensorflow tensorflow
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.SparseTensorToCSRSparseMatrix` does not fully validate the input arguments. This results in a `CHECK`-failure which can be used to trigger a denial of service attack. The code assumes `dense_shape` is a vector and `indices` is a matrix (as part of requirements for sparse tensors) but there is no validation for this. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.
AI-Powered Analysis
Technical Analysis
CVE-2022-29198 is a medium severity vulnerability in TensorFlow, an open-source machine learning platform widely used for developing and deploying machine learning models. The vulnerability arises from improper input validation in the implementation of the function tf.raw_ops.SparseTensorToCSRSparseMatrix. Specifically, the function assumes that the input argument 'dense_shape' is a vector and 'indices' is a matrix, as required for sparse tensor representations. However, prior to TensorFlow versions 2.6.4, 2.7.2, 2.8.1, and 2.9.0, there was no enforcement or validation to confirm these assumptions. This lack of validation can cause the program to hit a CHECK failure, which is an internal assertion failure in TensorFlow's codebase. Such a failure can be deliberately triggered by an attacker supplying malformed inputs, resulting in a denial of service (DoS) condition where the TensorFlow process crashes or terminates unexpectedly. The vulnerability does not appear to allow for code execution, privilege escalation, or data leakage, but it can disrupt availability of services relying on TensorFlow. The issue has been patched in the specified versions, so upgrading to TensorFlow 2.6.4, 2.7.2, 2.8.1, or 2.9.0 or later mitigates the risk. There are no known exploits in the wild, and exploitation requires supplying crafted inputs to the vulnerable function, which may require some level of access to the TensorFlow environment or the ability to influence input data to machine learning pipelines using this function.
Potential Impact
For European organizations, the primary impact of this vulnerability is on the availability of machine learning services and applications that utilize affected TensorFlow versions. Organizations relying on TensorFlow for critical AI workloads, data analytics, or automated decision-making could experience service interruptions if an attacker triggers the denial of service condition. This could affect sectors such as finance, healthcare, manufacturing, and telecommunications where AI models are integrated into operational workflows. Although the vulnerability does not directly compromise confidentiality or integrity, the disruption of AI services could lead to operational delays, loss of productivity, and potential financial losses. Additionally, organizations providing AI-as-a-service or cloud-based machine learning platforms could face reputational damage if customers experience outages. Since TensorFlow is widely adopted in research institutions and enterprises across Europe, the scope of affected systems is significant, especially in environments where input data is not strictly sanitized or controlled. However, exploitation requires the ability to supply malicious inputs to the vulnerable function, which may limit the attack surface to internal or semi-trusted users or systems.
Mitigation Recommendations
1. Upgrade TensorFlow to a patched version: Organizations should prioritize upgrading to TensorFlow versions 2.6.4, 2.7.2, 2.8.1, 2.9.0, or later to ensure the vulnerability is remediated. 2. Input validation and sanitization: Implement strict validation of input data before it reaches TensorFlow functions, especially for sparse tensor inputs. Enforce schema checks to ensure 'dense_shape' is a vector and 'indices' is a matrix as expected. 3. Restrict access to ML pipelines: Limit the ability to supply inputs to TensorFlow processing pipelines to trusted users and systems only, reducing the risk of malicious input injection. 4. Monitor and alert on TensorFlow crashes: Deploy monitoring to detect unexpected TensorFlow process terminations or CHECK failures, enabling rapid incident response. 5. Use containerization or sandboxing: Run TensorFlow workloads in isolated environments to contain potential denial of service impacts and prevent cascading failures in larger systems. 6. Conduct security reviews of ML workflows: Regularly audit machine learning pipelines for input validation weaknesses and ensure secure coding practices are followed when integrating TensorFlow operations.
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2022-04-13T00:00:00.000Z
- Cisa Enriched
- true
Threat ID: 682d9848c4522896dcbf64f9
Added to database: 5/21/2025, 9:09:28 AM
Last enriched: 6/22/2025, 1:23:00 AM
Last updated: 2/7/2026, 7:10:46 AM
Views: 38
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2026-2076: Improper Authorization in yeqifu warehouse
MediumCVE-2025-15491: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Post Slides
HighCVE-2025-15267: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in boldthemes Bold Page Builder
MediumCVE-2025-13463: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in boldthemes Bold Page Builder
MediumCVE-2025-12803: CWE-80 Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) in boldthemes Bold Page Builder
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
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.