CVE-2022-35970: CWE-20: Improper Input Validation in tensorflow tensorflow
TensorFlow is an open source platform for machine learning. If `QuantizedInstanceNorm` is given `x_min` or `x_max` tensors of a nonzero rank, it results in a segfault that can be used to trigger a denial of service attack. We have patched the issue in GitHub commit 785d67a78a1d533759fcd2f5e8d6ef778de849e0. 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 Analysis
Technical Summary
CVE-2022-35970 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 `QuantizedInstanceNorm` operation. Specifically, when the `x_min` or `x_max` tensors provided to this function have a nonzero rank (i.e., they are not scalar tensors as expected), the system triggers a segmentation fault (segfault). This segfault can be exploited to cause a denial of service (DoS) condition by crashing the application or service utilizing TensorFlow. The vulnerability affects multiple TensorFlow versions: all versions prior to 2.7.2, versions from 2.8.0 up to but not including 2.8.1, and versions from 2.9.0 up to but not including 2.9.1. The issue has been patched in TensorFlow 2.10.0 and backported to 2.7.2, 2.8.1, and 2.9.1. There are currently no known workarounds, and no exploits have been observed in the wild. The root cause is a failure to properly validate the shape and rank of input tensors before processing, leading to memory access violations and crashes. This vulnerability primarily impacts the availability of systems running affected TensorFlow versions, as it can be triggered remotely if the vulnerable operation is exposed through an interface. However, it does not directly compromise confidentiality or integrity. Exploitation requires the ability to supply crafted inputs to the vulnerable TensorFlow operation, which may be possible in environments where TensorFlow processes untrusted or user-supplied data. The fix involves input validation enhancements to ensure that `x_min` and `x_max` tensors have the expected scalar rank before processing, preventing the segfault.
Potential Impact
For European organizations, the primary impact of CVE-2022-35970 is the potential for denial of service attacks against machine learning services or applications that utilize vulnerable TensorFlow versions. This can lead to service outages, disruption of business-critical AI workloads, and potential loss of productivity. Organizations relying on TensorFlow for real-time inference, automated decision-making, or data processing pipelines may experience interruptions that affect operational continuity. While the vulnerability does not directly expose sensitive data or allow unauthorized code execution, the availability impact can indirectly affect business operations and service level agreements. Sectors such as finance, healthcare, automotive, and manufacturing in Europe that increasingly integrate AI/ML models into their infrastructure could be particularly affected if they use vulnerable TensorFlow versions without timely patching. Additionally, organizations providing AI-as-a-Service or cloud-based ML platforms may face reputational damage and customer trust issues if exploited. Given the lack of known exploits in the wild, the immediate risk is moderate; however, the widespread use of TensorFlow and the ease of triggering a crash through crafted inputs mean that unpatched systems remain vulnerable to DoS attacks.
Mitigation Recommendations
1. Immediate upgrade of TensorFlow 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. 2. Audit all machine learning pipelines and applications to identify usage of the `QuantizedInstanceNorm` operation and ensure that inputs to this function are strictly validated for tensor rank and shape before processing. 3. Implement input sanitization and validation at the application layer to prevent malformed or malicious tensor inputs from reaching TensorFlow operations. 4. Restrict access to machine learning model inference endpoints to trusted users and networks to reduce the attack surface. 5. Monitor application logs and system metrics for signs of unexpected crashes or segfaults related to TensorFlow processes. 6. For organizations deploying TensorFlow in containerized or cloud environments, leverage orchestration tools to automatically restart failed services and alert on repeated crashes. 7. Engage with TensorFlow community and security advisories to stay informed about further patches or related vulnerabilities. 8. Consider implementing rate limiting and anomaly detection on ML service interfaces to mitigate potential DoS attempts.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain, Poland, Belgium
CVE-2022-35970: CWE-20: Improper Input Validation in tensorflow tensorflow
Description
TensorFlow is an open source platform for machine learning. If `QuantizedInstanceNorm` is given `x_min` or `x_max` tensors of a nonzero rank, it results in a segfault that can be used to trigger a denial of service attack. We have patched the issue in GitHub commit 785d67a78a1d533759fcd2f5e8d6ef778de849e0. 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
Technical Analysis
CVE-2022-35970 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 `QuantizedInstanceNorm` operation. Specifically, when the `x_min` or `x_max` tensors provided to this function have a nonzero rank (i.e., they are not scalar tensors as expected), the system triggers a segmentation fault (segfault). This segfault can be exploited to cause a denial of service (DoS) condition by crashing the application or service utilizing TensorFlow. The vulnerability affects multiple TensorFlow versions: all versions prior to 2.7.2, versions from 2.8.0 up to but not including 2.8.1, and versions from 2.9.0 up to but not including 2.9.1. The issue has been patched in TensorFlow 2.10.0 and backported to 2.7.2, 2.8.1, and 2.9.1. There are currently no known workarounds, and no exploits have been observed in the wild. The root cause is a failure to properly validate the shape and rank of input tensors before processing, leading to memory access violations and crashes. This vulnerability primarily impacts the availability of systems running affected TensorFlow versions, as it can be triggered remotely if the vulnerable operation is exposed through an interface. However, it does not directly compromise confidentiality or integrity. Exploitation requires the ability to supply crafted inputs to the vulnerable TensorFlow operation, which may be possible in environments where TensorFlow processes untrusted or user-supplied data. The fix involves input validation enhancements to ensure that `x_min` and `x_max` tensors have the expected scalar rank before processing, preventing the segfault.
Potential Impact
For European organizations, the primary impact of CVE-2022-35970 is the potential for denial of service attacks against machine learning services or applications that utilize vulnerable TensorFlow versions. This can lead to service outages, disruption of business-critical AI workloads, and potential loss of productivity. Organizations relying on TensorFlow for real-time inference, automated decision-making, or data processing pipelines may experience interruptions that affect operational continuity. While the vulnerability does not directly expose sensitive data or allow unauthorized code execution, the availability impact can indirectly affect business operations and service level agreements. Sectors such as finance, healthcare, automotive, and manufacturing in Europe that increasingly integrate AI/ML models into their infrastructure could be particularly affected if they use vulnerable TensorFlow versions without timely patching. Additionally, organizations providing AI-as-a-Service or cloud-based ML platforms may face reputational damage and customer trust issues if exploited. Given the lack of known exploits in the wild, the immediate risk is moderate; however, the widespread use of TensorFlow and the ease of triggering a crash through crafted inputs mean that unpatched systems remain vulnerable to DoS attacks.
Mitigation Recommendations
1. Immediate upgrade of TensorFlow 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. 2. Audit all machine learning pipelines and applications to identify usage of the `QuantizedInstanceNorm` operation and ensure that inputs to this function are strictly validated for tensor rank and shape before processing. 3. Implement input sanitization and validation at the application layer to prevent malformed or malicious tensor inputs from reaching TensorFlow operations. 4. Restrict access to machine learning model inference endpoints to trusted users and networks to reduce the attack surface. 5. Monitor application logs and system metrics for signs of unexpected crashes or segfaults related to TensorFlow processes. 6. For organizations deploying TensorFlow in containerized or cloud environments, leverage orchestration tools to automatically restart failed services and alert on repeated crashes. 7. Engage with TensorFlow community and security advisories to stay informed about further patches or related vulnerabilities. 8. Consider implementing rate limiting and anomaly detection on ML service interfaces to mitigate potential DoS attempts.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2022-07-15T00:00:00.000Z
- Cisa Enriched
- true
Threat ID: 682d9845c4522896dcbf407c
Added to database: 5/21/2025, 9:09:25 AM
Last enriched: 6/22/2025, 8:05:33 PM
Last updated: 7/31/2025, 7:02:11 PM
Views: 11
Related Threats
CVE-2025-8929: SQL Injection in code-projects Medical Store Management System
MediumCVE-2025-8928: SQL Injection in code-projects Medical Store Management System
MediumCVE-2025-34154: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Synergetic Data Systems Inc. UnForm Server Manager
CriticalCVE-2025-8927: Improper Restriction of Excessive Authentication Attempts in mtons mblog
MediumCVE-2025-43988: n/a
CriticalActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.