CVE-2022-36004: CWE-617: Reachable Assertion in tensorflow tensorflow
TensorFlow is an open source platform for machine learning. When `tf.random.gamma` receives large input shape and rates, it gives a `CHECK` fail that can trigger a denial of service attack. We have patched the issue in GitHub commit 552bfced6ce4809db5f3ca305f60ff80dd40c5a3. 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-36004 is a vulnerability identified in TensorFlow, an open-source machine learning platform widely used for developing and deploying machine learning models. The issue arises specifically in the `tf.random.gamma` function, which is designed to generate random numbers from a gamma distribution. When this function receives large input parameters for shape and rate, it triggers a `CHECK` failure, which is an assertion mechanism used internally by TensorFlow to validate assumptions during execution. This failure leads to a denial of service (DoS) condition by causing the application or service using TensorFlow to crash or become unresponsive. The root cause is classified under CWE-617 (Reachable Assertion), indicating that an assertion can be triggered by external inputs, leading to abnormal termination of the program. 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 TensorFlow development team has addressed this issue in a GitHub commit (552bfced6ce4809db5f3ca305f60ff80dd40c5a3), with the fix included in TensorFlow 2.10.0 and backported to 2.9.1, 2.8.1, and 2.7.2. No known workarounds exist, meaning that upgrading to a patched version is the primary remediation method. There are no reports of active exploitation in the wild to date. This vulnerability does not require authentication or user interaction to be triggered; it can be exploited by providing crafted inputs to the vulnerable function. Since TensorFlow is often embedded in backend services, data processing pipelines, or exposed APIs, an attacker capable of influencing input parameters to `tf.random.gamma` could cause service disruption. However, exploitation requires the ability to supply specific inputs to the affected function, which may limit the attack surface depending on deployment context.
Potential Impact
For European organizations, the impact of CVE-2022-36004 primarily revolves around availability disruptions in machine learning services or applications that utilize vulnerable TensorFlow versions. Organizations relying on TensorFlow for critical data analytics, AI-driven decision-making, or automated processes could experience service outages or degraded performance if this vulnerability is exploited. This could affect sectors such as finance, healthcare, manufacturing, and telecommunications, where machine learning models are increasingly integrated into operational workflows. Given the absence of known exploits, the immediate risk is moderate; however, the potential for denial of service could lead to operational downtime, loss of productivity, and reputational damage. In environments where TensorFlow is exposed to untrusted inputs—such as public-facing APIs or multi-tenant cloud services—the risk is elevated. Additionally, disruption in AI model training or inference pipelines could delay critical business functions or research activities. Confidentiality and integrity impacts are minimal, as the vulnerability does not allow for data leakage or unauthorized data modification. The primary concern is availability, which could cascade into broader business impacts depending on the criticality of affected services.
Mitigation Recommendations
1. Immediate Upgrade: European organizations should prioritize upgrading TensorFlow installations to version 2.10.0 or later, or apply the backported patches available in versions 2.9.1, 2.8.1, and 2.7.2. This is the only effective mitigation since no workarounds exist. 2. Input Validation and Sanitization: Implement strict validation on inputs that influence the parameters passed to `tf.random.gamma`. Restrict the size and range of shape and rate parameters to prevent triggering the assertion failure. 3. Isolate ML Workloads: Run TensorFlow workloads in isolated environments or containers with resource limits and monitoring to contain potential crashes and facilitate rapid recovery. 4. Monitoring and Alerting: Deploy monitoring solutions to detect abnormal TensorFlow process terminations or service disruptions indicative of exploitation attempts. 5. Access Controls: Limit access to interfaces or APIs that allow external input to TensorFlow functions, reducing the attack surface. 6. Incident Response Preparedness: Prepare response plans for potential denial of service incidents affecting machine learning services, including failover mechanisms and backup models. 7. Vendor Coordination: Engage with cloud and software vendors to ensure that managed TensorFlow services are patched and that security advisories are followed.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Denmark, Belgium, Italy, Spain
CVE-2022-36004: CWE-617: Reachable Assertion in tensorflow tensorflow
Description
TensorFlow is an open source platform for machine learning. When `tf.random.gamma` receives large input shape and rates, it gives a `CHECK` fail that can trigger a denial of service attack. We have patched the issue in GitHub commit 552bfced6ce4809db5f3ca305f60ff80dd40c5a3. 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-36004 is a vulnerability identified in TensorFlow, an open-source machine learning platform widely used for developing and deploying machine learning models. The issue arises specifically in the `tf.random.gamma` function, which is designed to generate random numbers from a gamma distribution. When this function receives large input parameters for shape and rate, it triggers a `CHECK` failure, which is an assertion mechanism used internally by TensorFlow to validate assumptions during execution. This failure leads to a denial of service (DoS) condition by causing the application or service using TensorFlow to crash or become unresponsive. The root cause is classified under CWE-617 (Reachable Assertion), indicating that an assertion can be triggered by external inputs, leading to abnormal termination of the program. 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 TensorFlow development team has addressed this issue in a GitHub commit (552bfced6ce4809db5f3ca305f60ff80dd40c5a3), with the fix included in TensorFlow 2.10.0 and backported to 2.9.1, 2.8.1, and 2.7.2. No known workarounds exist, meaning that upgrading to a patched version is the primary remediation method. There are no reports of active exploitation in the wild to date. This vulnerability does not require authentication or user interaction to be triggered; it can be exploited by providing crafted inputs to the vulnerable function. Since TensorFlow is often embedded in backend services, data processing pipelines, or exposed APIs, an attacker capable of influencing input parameters to `tf.random.gamma` could cause service disruption. However, exploitation requires the ability to supply specific inputs to the affected function, which may limit the attack surface depending on deployment context.
Potential Impact
For European organizations, the impact of CVE-2022-36004 primarily revolves around availability disruptions in machine learning services or applications that utilize vulnerable TensorFlow versions. Organizations relying on TensorFlow for critical data analytics, AI-driven decision-making, or automated processes could experience service outages or degraded performance if this vulnerability is exploited. This could affect sectors such as finance, healthcare, manufacturing, and telecommunications, where machine learning models are increasingly integrated into operational workflows. Given the absence of known exploits, the immediate risk is moderate; however, the potential for denial of service could lead to operational downtime, loss of productivity, and reputational damage. In environments where TensorFlow is exposed to untrusted inputs—such as public-facing APIs or multi-tenant cloud services—the risk is elevated. Additionally, disruption in AI model training or inference pipelines could delay critical business functions or research activities. Confidentiality and integrity impacts are minimal, as the vulnerability does not allow for data leakage or unauthorized data modification. The primary concern is availability, which could cascade into broader business impacts depending on the criticality of affected services.
Mitigation Recommendations
1. Immediate Upgrade: European organizations should prioritize upgrading TensorFlow installations to version 2.10.0 or later, or apply the backported patches available in versions 2.9.1, 2.8.1, and 2.7.2. This is the only effective mitigation since no workarounds exist. 2. Input Validation and Sanitization: Implement strict validation on inputs that influence the parameters passed to `tf.random.gamma`. Restrict the size and range of shape and rate parameters to prevent triggering the assertion failure. 3. Isolate ML Workloads: Run TensorFlow workloads in isolated environments or containers with resource limits and monitoring to contain potential crashes and facilitate rapid recovery. 4. Monitoring and Alerting: Deploy monitoring solutions to detect abnormal TensorFlow process terminations or service disruptions indicative of exploitation attempts. 5. Access Controls: Limit access to interfaces or APIs that allow external input to TensorFlow functions, reducing the attack surface. 6. Incident Response Preparedness: Prepare response plans for potential denial of service incidents affecting machine learning services, including failover mechanisms and backup models. 7. Vendor Coordination: Engage with cloud and software vendors to ensure that managed TensorFlow services are patched and that security advisories are followed.
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: 682d9845c4522896dcbf4343
Added to database: 5/21/2025, 9:09:25 AM
Last enriched: 6/22/2025, 5:23:43 PM
Last updated: 8/11/2025, 9:04:21 AM
Views: 9
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.