Skip to main content

CVE-2022-23557: CWE-369: Divide By Zero in tensorflow tensorflow

Medium
VulnerabilityCVE-2022-23557cvecve-2022-23557cwe-369-divide-by-zero
Published: Fri Feb 04 2022 (02/04/2022, 22:32:44 UTC)
Source: CVE
Vendor/Project: tensorflow
Product: 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

AILast updated: 06/22/2025, 03:21:52 UTC

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.

Need more detailed analysis?Get Pro

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

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats