CVE-2022-35987: CWE-617: Reachable Assertion in tensorflow tensorflow
TensorFlow is an open source platform for machine learning. `DenseBincount` assumes its input tensor `weights` to either have the same shape as its input tensor `input` or to be length-0. A different `weights` shape will trigger a `CHECK` fail that can be used to trigger a denial of service attack. We have patched the issue in GitHub commit bf4c14353c2328636a18bfad1e151052c81d5f43. 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-35987 is a vulnerability identified in TensorFlow, an open-source machine learning platform widely used for developing and deploying machine learning models. The issue arises in the `DenseBincount` operation, which expects its input tensor `weights` to either have the same shape as the input tensor `input` or to be of length zero. If the `weights` tensor shape deviates from these expectations, it triggers a `CHECK` failure, which is an assertion failure within the TensorFlow codebase. This assertion failure leads to a denial of service (DoS) condition by crashing the process running the TensorFlow operation. The vulnerability is classified under CWE-617 (Reachable Assertion), indicating that an attacker can deliberately cause the assertion to fail by providing crafted input data. The affected TensorFlow versions include all 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 has been patched in TensorFlow 2.10.0 and backported to supported versions 2.7.2, 2.8.1, and 2.9.1. No known workarounds exist, meaning users must update to patched versions to mitigate the risk. There are no known exploits in the wild, and exploitation requires supplying malformed input tensors to the vulnerable function, which may require some level of access to the machine learning pipeline or the ability to influence input data. The vulnerability impacts the availability of TensorFlow-based services by causing unexpected crashes, potentially disrupting machine learning workflows or applications relying on TensorFlow for inference or training tasks.
Potential Impact
For European organizations, the impact of this vulnerability primarily concerns the availability of machine learning services and applications that utilize TensorFlow. Organizations in sectors such as finance, healthcare, automotive, and manufacturing, which increasingly rely on machine learning models for critical decision-making, predictive analytics, or automation, could face service interruptions if the vulnerability is exploited. Although the vulnerability does not directly compromise confidentiality or integrity, denial of service conditions can lead to operational downtime, loss of productivity, and potential financial losses. Additionally, organizations providing machine learning as a service (MLaaS) or deploying TensorFlow models in cloud environments may experience degraded service quality or outages. Since exploitation requires crafted input tensors, attackers would need some level of access to the data pipeline or model input channels, which could be possible in multi-tenant environments or where user-supplied data is processed without sufficient validation. The absence of known exploits reduces immediate risk, but the widespread adoption of TensorFlow in Europe means that unpatched systems remain vulnerable to potential future attacks. The vulnerability's impact is thus medium in severity but significant for organizations with critical uptime requirements for AI/ML workloads.
Mitigation Recommendations
To mitigate this vulnerability, European organizations should prioritize upgrading TensorFlow installations to version 2.10.0 or later, or to the patched versions 2.7.2, 2.8.1, or 2.9.1 if they are using those supported branches. Since no workarounds exist, patching is the only effective mitigation. Organizations should audit their machine learning pipelines to identify all instances of TensorFlow usage, including embedded or containerized deployments, to ensure comprehensive patch coverage. Additionally, implementing strict input validation and sanitization on tensors supplied to TensorFlow operations can reduce the risk of malformed inputs triggering the assertion failure. For environments where user-supplied data is processed, applying sandboxing or isolation techniques can limit the impact of potential crashes. Monitoring TensorFlow service logs for unexpected crashes or assertion failures can help detect attempted exploitation. Finally, organizations should incorporate this vulnerability into their vulnerability management and patching policies, ensuring timely updates and testing of TensorFlow components in development and production environments.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain
CVE-2022-35987: CWE-617: Reachable Assertion in tensorflow tensorflow
Description
TensorFlow is an open source platform for machine learning. `DenseBincount` assumes its input tensor `weights` to either have the same shape as its input tensor `input` or to be length-0. A different `weights` shape will trigger a `CHECK` fail that can be used to trigger a denial of service attack. We have patched the issue in GitHub commit bf4c14353c2328636a18bfad1e151052c81d5f43. 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-35987 is a vulnerability identified in TensorFlow, an open-source machine learning platform widely used for developing and deploying machine learning models. The issue arises in the `DenseBincount` operation, which expects its input tensor `weights` to either have the same shape as the input tensor `input` or to be of length zero. If the `weights` tensor shape deviates from these expectations, it triggers a `CHECK` failure, which is an assertion failure within the TensorFlow codebase. This assertion failure leads to a denial of service (DoS) condition by crashing the process running the TensorFlow operation. The vulnerability is classified under CWE-617 (Reachable Assertion), indicating that an attacker can deliberately cause the assertion to fail by providing crafted input data. The affected TensorFlow versions include all 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 has been patched in TensorFlow 2.10.0 and backported to supported versions 2.7.2, 2.8.1, and 2.9.1. No known workarounds exist, meaning users must update to patched versions to mitigate the risk. There are no known exploits in the wild, and exploitation requires supplying malformed input tensors to the vulnerable function, which may require some level of access to the machine learning pipeline or the ability to influence input data. The vulnerability impacts the availability of TensorFlow-based services by causing unexpected crashes, potentially disrupting machine learning workflows or applications relying on TensorFlow for inference or training tasks.
Potential Impact
For European organizations, the impact of this vulnerability primarily concerns the availability of machine learning services and applications that utilize TensorFlow. Organizations in sectors such as finance, healthcare, automotive, and manufacturing, which increasingly rely on machine learning models for critical decision-making, predictive analytics, or automation, could face service interruptions if the vulnerability is exploited. Although the vulnerability does not directly compromise confidentiality or integrity, denial of service conditions can lead to operational downtime, loss of productivity, and potential financial losses. Additionally, organizations providing machine learning as a service (MLaaS) or deploying TensorFlow models in cloud environments may experience degraded service quality or outages. Since exploitation requires crafted input tensors, attackers would need some level of access to the data pipeline or model input channels, which could be possible in multi-tenant environments or where user-supplied data is processed without sufficient validation. The absence of known exploits reduces immediate risk, but the widespread adoption of TensorFlow in Europe means that unpatched systems remain vulnerable to potential future attacks. The vulnerability's impact is thus medium in severity but significant for organizations with critical uptime requirements for AI/ML workloads.
Mitigation Recommendations
To mitigate this vulnerability, European organizations should prioritize upgrading TensorFlow installations to version 2.10.0 or later, or to the patched versions 2.7.2, 2.8.1, or 2.9.1 if they are using those supported branches. Since no workarounds exist, patching is the only effective mitigation. Organizations should audit their machine learning pipelines to identify all instances of TensorFlow usage, including embedded or containerized deployments, to ensure comprehensive patch coverage. Additionally, implementing strict input validation and sanitization on tensors supplied to TensorFlow operations can reduce the risk of malformed inputs triggering the assertion failure. For environments where user-supplied data is processed, applying sandboxing or isolation techniques can limit the impact of potential crashes. Monitoring TensorFlow service logs for unexpected crashes or assertion failures can help detect attempted exploitation. Finally, organizations should incorporate this vulnerability into their vulnerability management and patching policies, ensuring timely updates and testing of TensorFlow components in development and production environments.
Affected Countries
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: 682d9845c4522896dcbf40f2
Added to database: 5/21/2025, 9:09:25 AM
Last enriched: 6/22/2025, 7:49:37 PM
Last updated: 8/18/2025, 10:33:44 AM
Views: 12
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.