Skip to main content

CVE-2022-35940: CWE-190: Integer Overflow or Wraparound in tensorflow tensorflow

Medium
Published: Fri Sep 16 2022 (09/16/2022, 19:45:20 UTC)
Source: CVE
Vendor/Project: tensorflow
Product: tensorflow

Description

TensorFlow is an open source platform for machine learning. The `RaggedRangOp` function takes an argument `limits` that is eventually used to construct a `TensorShape` as an `int64`. If `limits` is a very large float, it can overflow when converted to an `int64`. This triggers an `InvalidArgument` but also throws an abort signal that crashes the program. We have patched the issue in GitHub commit 37cefa91bee4eace55715eeef43720b958a01192. 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

AILast updated: 06/22/2025, 20:20:39 UTC

Technical Analysis

CVE-2022-35940 is a medium-severity integer overflow vulnerability in TensorFlow, an open-source machine learning platform widely used for developing and deploying ML models. The vulnerability exists in the RaggedRangOp function, which accepts a parameter named 'limits'. This parameter is eventually converted into a TensorShape using a 64-bit integer (int64). If an attacker supplies a very large floating-point value for 'limits', the conversion to int64 can overflow or wrap around, causing an invalid argument error. More critically, this overflow triggers an abort signal that crashes the TensorFlow process. This denial-of-service (DoS) condition can disrupt applications relying on TensorFlow for machine learning tasks. The issue affects TensorFlow 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 vulnerability has been patched in TensorFlow 2.10.0 and backported to supported versions 2.7.2, 2.8.1, and 2.9.1. There are no known workarounds, and no exploits have been observed in the wild to date. The root cause is a classic integer overflow (CWE-190) during type conversion, which leads to an unhandled abort signal and application crash, impacting availability but not directly compromising confidentiality or integrity. Exploitation requires supplying crafted input to the vulnerable function, which may be possible in environments where untrusted data is processed by TensorFlow models or services.

Potential Impact

For European organizations, the primary impact of this vulnerability is a potential denial-of-service condition in systems leveraging vulnerable TensorFlow versions. Organizations using TensorFlow for critical ML workloads—such as financial institutions performing fraud detection, healthcare providers analyzing medical data, or manufacturing firms using predictive maintenance—may experience service disruptions if an attacker supplies maliciously crafted input to trigger the overflow. While the vulnerability does not appear to allow remote code execution or data leakage, the availability impact could interrupt automated decision-making processes or ML-driven services, leading to operational downtime and potential financial loss. Given TensorFlow's widespread adoption in research, industry, and government projects across Europe, the vulnerability could affect cloud services, on-premises deployments, and edge devices running vulnerable versions. The lack of known exploits reduces immediate risk, but the absence of workarounds means that unpatched systems remain vulnerable to crashes. Organizations with exposed ML inference endpoints or those processing untrusted inputs should be particularly cautious. Additionally, disruption in ML pipelines could delay analytics and reporting, impacting business continuity.

Mitigation Recommendations

European organizations should prioritize upgrading TensorFlow to version 2.10.0 or later, or apply the backported patches available for versions 2.7.2, 2.8.1, and 2.9.1. Since no workarounds exist, patching is the only effective mitigation. Organizations should audit their environments to identify all TensorFlow deployments, including containerized applications, cloud ML services, and embedded systems. Implement input validation and sanitization at the application layer to restrict or verify the size and type of inputs passed to TensorFlow functions, especially those involving 'limits' parameters or similar constructs. Where possible, isolate ML workloads processing untrusted data in sandboxed or containerized environments to limit the blast radius of potential crashes. Monitoring and alerting should be enhanced to detect abnormal TensorFlow process terminations or crashes, enabling rapid incident response. For cloud-based ML services, coordinate with providers to confirm patch status and request updates if necessary. Finally, incorporate this vulnerability into vulnerability management and patching cycles to ensure timely remediation.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2022-07-15T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d9845c4522896dcbf3ffc

Added to database: 5/21/2025, 9:09:25 AM

Last enriched: 6/22/2025, 8:20:39 PM

Last updated: 7/26/2025, 3:10:31 PM

Views: 11

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