CVE-2022-23557: CWE-369: Divide By Zero in tensorflow tensorflow
Tensorflow is an Open Source Machine Learning Framework. An attacker can craft a TFLite model that would trigger a division by zero in `BiasAndClamp` implementation. There is no check that the `bias_size` is non zero. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.
AI Analysis
Technical Summary
CVE-2022-23557 is a medium-severity vulnerability in TensorFlow, an open-source machine learning framework widely used for developing and deploying machine learning models. The vulnerability arises from a divide-by-zero error in the implementation of the `BiasAndClamp` function within TensorFlow Lite (TFLite), a lightweight version of TensorFlow designed for mobile and embedded devices. Specifically, the issue occurs because there is no validation to ensure that the `bias_size` parameter is non-zero before it is used as a divisor. An attacker can craft a malicious TFLite model that triggers this division by zero, potentially causing a crash or denial of service (DoS) in applications that load and execute the model. The affected TensorFlow versions include 2.5.3 and earlier, as well as certain subversions of 2.6.x and 2.7.x, all of which are still within the supported range at the time of disclosure. The fix for this vulnerability is included starting from TensorFlow 2.8.0, with backported patches planned for versions 2.7.1, 2.6.3, and 2.5.3. No known exploits have been reported in the wild, indicating that exploitation requires a crafted malicious model to be loaded by a vulnerable application. The vulnerability does not require authentication or user interaction beyond loading the malicious model, which could be delivered via supply chain compromise, third-party model sharing, or untrusted input sources in applications using TensorFlow Lite. The impact primarily affects availability due to potential application crashes, but depending on the deployment context, it could also disrupt machine learning inference pipelines or embedded systems relying on TFLite models.
Potential Impact
For European organizations, the impact of CVE-2022-23557 depends largely on their use of TensorFlow Lite in production environments. Organizations deploying machine learning models on mobile devices, edge computing platforms, or embedded systems using vulnerable TensorFlow versions are at risk of denial of service through crafted models. This could disrupt critical services such as automated decision-making, real-time analytics, or IoT device functionality. Sectors like automotive, healthcare, manufacturing, and telecommunications that increasingly rely on embedded AI could experience operational interruptions. While the vulnerability does not directly compromise confidentiality or integrity, the availability impact can lead to service downtime, loss of trust, and potential safety risks in critical systems. Additionally, organizations that consume third-party or open-source TFLite models without validation may inadvertently introduce malicious models, increasing their exposure. The lack of known exploits suggests a lower immediate threat, but the ease of triggering the fault by loading a crafted model means that supply chain attacks or insider threats could leverage this vulnerability. European organizations with stringent uptime and reliability requirements must consider this vulnerability seriously to avoid disruptions in AI-powered services.
Mitigation Recommendations
To mitigate CVE-2022-23557, European organizations should: 1) Upgrade TensorFlow to version 2.8.0 or later, or apply the backported patches for versions 2.7.1, 2.6.3, and 2.5.3 as soon as they become available. 2) Implement strict validation and integrity checks on all TFLite models before deployment, including verifying model provenance and using cryptographic signatures where possible to prevent loading malicious or tampered models. 3) Employ runtime monitoring to detect abnormal crashes or failures in applications using TensorFlow Lite, enabling rapid response to potential exploitation attempts. 4) Limit the acceptance of externally sourced models, especially from untrusted or unknown sources, and enforce sandboxing or isolation of model execution environments to contain potential crashes. 5) For embedded and IoT devices, ensure firmware and software update mechanisms are robust to allow timely patching of TensorFlow components. 6) Conduct security reviews of machine learning pipelines to identify and remediate any indirect exposure to crafted models. These steps go beyond generic patching by emphasizing supply chain security, runtime detection, and operational controls tailored to TensorFlow Lite deployments.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain
CVE-2022-23557: CWE-369: Divide By Zero in tensorflow tensorflow
Description
Tensorflow is an Open Source Machine Learning Framework. An attacker can craft a TFLite model that would trigger a division by zero in `BiasAndClamp` implementation. There is no check that the `bias_size` is non zero. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.
AI-Powered Analysis
Technical Analysis
CVE-2022-23557 is a medium-severity vulnerability in TensorFlow, an open-source machine learning framework widely used for developing and deploying machine learning models. The vulnerability arises from a divide-by-zero error in the implementation of the `BiasAndClamp` function within TensorFlow Lite (TFLite), a lightweight version of TensorFlow designed for mobile and embedded devices. Specifically, the issue occurs because there is no validation to ensure that the `bias_size` parameter is non-zero before it is used as a divisor. An attacker can craft a malicious TFLite model that triggers this division by zero, potentially causing a crash or denial of service (DoS) in applications that load and execute the model. The affected TensorFlow versions include 2.5.3 and earlier, as well as certain subversions of 2.6.x and 2.7.x, all of which are still within the supported range at the time of disclosure. The fix for this vulnerability is included starting from TensorFlow 2.8.0, with backported patches planned for versions 2.7.1, 2.6.3, and 2.5.3. No known exploits have been reported in the wild, indicating that exploitation requires a crafted malicious model to be loaded by a vulnerable application. The vulnerability does not require authentication or user interaction beyond loading the malicious model, which could be delivered via supply chain compromise, third-party model sharing, or untrusted input sources in applications using TensorFlow Lite. The impact primarily affects availability due to potential application crashes, but depending on the deployment context, it could also disrupt machine learning inference pipelines or embedded systems relying on TFLite models.
Potential Impact
For European organizations, the impact of CVE-2022-23557 depends largely on their use of TensorFlow Lite in production environments. Organizations deploying machine learning models on mobile devices, edge computing platforms, or embedded systems using vulnerable TensorFlow versions are at risk of denial of service through crafted models. This could disrupt critical services such as automated decision-making, real-time analytics, or IoT device functionality. Sectors like automotive, healthcare, manufacturing, and telecommunications that increasingly rely on embedded AI could experience operational interruptions. While the vulnerability does not directly compromise confidentiality or integrity, the availability impact can lead to service downtime, loss of trust, and potential safety risks in critical systems. Additionally, organizations that consume third-party or open-source TFLite models without validation may inadvertently introduce malicious models, increasing their exposure. The lack of known exploits suggests a lower immediate threat, but the ease of triggering the fault by loading a crafted model means that supply chain attacks or insider threats could leverage this vulnerability. European organizations with stringent uptime and reliability requirements must consider this vulnerability seriously to avoid disruptions in AI-powered services.
Mitigation Recommendations
To mitigate CVE-2022-23557, European organizations should: 1) Upgrade TensorFlow to version 2.8.0 or later, or apply the backported patches for versions 2.7.1, 2.6.3, and 2.5.3 as soon as they become available. 2) Implement strict validation and integrity checks on all TFLite models before deployment, including verifying model provenance and using cryptographic signatures where possible to prevent loading malicious or tampered models. 3) Employ runtime monitoring to detect abnormal crashes or failures in applications using TensorFlow Lite, enabling rapid response to potential exploitation attempts. 4) Limit the acceptance of externally sourced models, especially from untrusted or unknown sources, and enforce sandboxing or isolation of model execution environments to contain potential crashes. 5) For embedded and IoT devices, ensure firmware and software update mechanisms are robust to allow timely patching of TensorFlow components. 6) Conduct security reviews of machine learning pipelines to identify and remediate any indirect exposure to crafted models. These steps go beyond generic patching by emphasizing supply chain security, runtime detection, and operational controls tailored to TensorFlow Lite deployments.
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-01-19T00:00:00.000Z
- Cisa Enriched
- true
Threat ID: 682d9848c4522896dcbf6247
Added to database: 5/21/2025, 9:09:28 AM
Last enriched: 6/22/2025, 3:21:52 AM
Last updated: 8/11/2025, 6:43:32 PM
Views: 14
Related Threats
CVE-2025-52621: CWE-346 Origin Validation Error in HCL Software BigFix SaaS Remediate
MediumCVE-2025-52620: CWE-20 Improper Input Validation in HCL Software BigFix SaaS Remediate
MediumCVE-2025-52619: CWE-209 Generation of Error Message Containing Sensitive Information in HCL Software BigFix SaaS Remediate
MediumCVE-2025-52618: CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in HCL Software BigFix SaaS Remediate
MediumCVE-2025-43201: An app may be able to unexpectedly leak a user's credentials in Apple Apple Music Classical for Android
HighActions
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.