CVE-2022-35941: CWE-617: Reachable Assertion in tensorflow tensorflow
TensorFlow is an open source platform for machine learning. The `AvgPoolOp` function takes an argument `ksize` that must be positive but is not checked. A negative `ksize` can trigger a `CHECK` failure and crash the program. We have patched the issue in GitHub commit 3a6ac52664c6c095aa2b114e742b0aa17fdce78f. 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 to this issue.
AI Analysis
Technical Summary
CVE-2022-35941 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 the `AvgPoolOp` function, which accepts a parameter `ksize` representing the kernel size for average pooling operations. The issue is that `ksize` is expected to be a positive value, but TensorFlow versions prior to 2.7.2, and certain minor versions in the 2.8.x and 2.9.x branches, do not validate this input properly. If a negative value is passed to `ksize`, it triggers a reachable assertion failure (CWE-617) within the TensorFlow codebase. This assertion failure causes the program to crash abruptly, resulting in a denial-of-service (DoS) condition. The vulnerability does not appear to allow for arbitrary code execution or data leakage, but it can disrupt availability by crashing applications or services relying on TensorFlow for machine learning tasks. The issue was patched in GitHub commit 3a6ac52664c6c095aa2b114e742b0aa17fdce78f and included in TensorFlow 2.10.0, with backported fixes for 2.7.2, 2.8.1, and 2.9.1. No known exploits are currently reported in the wild, and no workarounds exist aside from upgrading to a patched version. The vulnerability requires that an attacker or user supply a crafted input to the vulnerable function, so exploitation depends on the ability to influence the `ksize` parameter in the TensorFlow environment. This may require some level of access or control over the machine learning pipeline or application code that invokes TensorFlow's average pooling operation.
Potential Impact
For European organizations, the primary impact of CVE-2022-35941 is a potential denial-of-service condition in systems that utilize vulnerable TensorFlow versions for machine learning workloads. This could affect industries relying heavily on AI/ML, such as finance, healthcare, automotive, telecommunications, and manufacturing. Disruptions could lead to downtime in critical AI-driven services, delayed data processing, or interruptions in automated decision-making systems. While the vulnerability does not directly compromise confidentiality or integrity, availability degradation can have cascading effects, especially in real-time or safety-critical applications. Organizations deploying TensorFlow in cloud environments or edge devices may experience service instability if unpatched. Since no known exploits exist in the wild, the immediate risk is moderate; however, the ease of triggering a crash by passing a negative `ksize` means that insider threats or malicious users with access to the ML pipeline could exploit this to cause outages. The lack of workarounds means patching is the only effective mitigation. Failure to address this vulnerability could result in reputational damage and operational losses if service interruptions occur.
Mitigation Recommendations
1. Upgrade 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 as soon as possible. 2. Review and sanitize all inputs to TensorFlow's average pooling operations, ensuring that `ksize` parameters are validated to be positive before invocation, especially if user input or external data influences these parameters. 3. Implement runtime monitoring and alerting for unexpected crashes or assertion failures in TensorFlow-based applications to detect potential exploitation attempts early. 4. Restrict access to machine learning pipelines and environments to trusted users only, minimizing the risk of malicious input injection. 5. For organizations using TensorFlow in containerized or cloud environments, employ automated patch management and continuous integration pipelines to ensure timely deployment of security updates. 6. Conduct code audits and testing of ML models and pipelines to identify any paths where negative or malformed `ksize` values could be introduced. 7. Maintain incident response readiness to quickly recover from potential denial-of-service events caused by this vulnerability.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain, Poland, Belgium
CVE-2022-35941: CWE-617: Reachable Assertion in tensorflow tensorflow
Description
TensorFlow is an open source platform for machine learning. The `AvgPoolOp` function takes an argument `ksize` that must be positive but is not checked. A negative `ksize` can trigger a `CHECK` failure and crash the program. We have patched the issue in GitHub commit 3a6ac52664c6c095aa2b114e742b0aa17fdce78f. 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 to this issue.
AI-Powered Analysis
Technical Analysis
CVE-2022-35941 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 the `AvgPoolOp` function, which accepts a parameter `ksize` representing the kernel size for average pooling operations. The issue is that `ksize` is expected to be a positive value, but TensorFlow versions prior to 2.7.2, and certain minor versions in the 2.8.x and 2.9.x branches, do not validate this input properly. If a negative value is passed to `ksize`, it triggers a reachable assertion failure (CWE-617) within the TensorFlow codebase. This assertion failure causes the program to crash abruptly, resulting in a denial-of-service (DoS) condition. The vulnerability does not appear to allow for arbitrary code execution or data leakage, but it can disrupt availability by crashing applications or services relying on TensorFlow for machine learning tasks. The issue was patched in GitHub commit 3a6ac52664c6c095aa2b114e742b0aa17fdce78f and included in TensorFlow 2.10.0, with backported fixes for 2.7.2, 2.8.1, and 2.9.1. No known exploits are currently reported in the wild, and no workarounds exist aside from upgrading to a patched version. The vulnerability requires that an attacker or user supply a crafted input to the vulnerable function, so exploitation depends on the ability to influence the `ksize` parameter in the TensorFlow environment. This may require some level of access or control over the machine learning pipeline or application code that invokes TensorFlow's average pooling operation.
Potential Impact
For European organizations, the primary impact of CVE-2022-35941 is a potential denial-of-service condition in systems that utilize vulnerable TensorFlow versions for machine learning workloads. This could affect industries relying heavily on AI/ML, such as finance, healthcare, automotive, telecommunications, and manufacturing. Disruptions could lead to downtime in critical AI-driven services, delayed data processing, or interruptions in automated decision-making systems. While the vulnerability does not directly compromise confidentiality or integrity, availability degradation can have cascading effects, especially in real-time or safety-critical applications. Organizations deploying TensorFlow in cloud environments or edge devices may experience service instability if unpatched. Since no known exploits exist in the wild, the immediate risk is moderate; however, the ease of triggering a crash by passing a negative `ksize` means that insider threats or malicious users with access to the ML pipeline could exploit this to cause outages. The lack of workarounds means patching is the only effective mitigation. Failure to address this vulnerability could result in reputational damage and operational losses if service interruptions occur.
Mitigation Recommendations
1. Upgrade 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 as soon as possible. 2. Review and sanitize all inputs to TensorFlow's average pooling operations, ensuring that `ksize` parameters are validated to be positive before invocation, especially if user input or external data influences these parameters. 3. Implement runtime monitoring and alerting for unexpected crashes or assertion failures in TensorFlow-based applications to detect potential exploitation attempts early. 4. Restrict access to machine learning pipelines and environments to trusted users only, minimizing the risk of malicious input injection. 5. For organizations using TensorFlow in containerized or cloud environments, employ automated patch management and continuous integration pipelines to ensure timely deployment of security updates. 6. Conduct code audits and testing of ML models and pipelines to identify any paths where negative or malformed `ksize` values could be introduced. 7. Maintain incident response readiness to quickly recover from potential denial-of-service events caused by this vulnerability.
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: 682d9845c4522896dcbf4000
Added to database: 5/21/2025, 9:09:25 AM
Last enriched: 6/22/2025, 8:20:29 PM
Last updated: 8/12/2025, 10:40:34 AM
Views: 14
Related Threats
CVE-2025-53948: CWE-415 Double Free in Santesoft Sante PACS Server
HighCVE-2025-52584: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-46269: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-54862: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumCVE-2025-54759: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumActions
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.