Skip to main content

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

Medium
Published: Fri Feb 04 2022 (02/04/2022, 22:32:14 UTC)
Source: CVE
Vendor/Project: tensorflow
Product: tensorflow

Description

Tensorflow is an Open Source Machine Learning Framework. Under certain scenarios, Grappler component of TensorFlow is vulnerable to an integer overflow during cost estimation for crop and resize. Since the cropping parameters are user controlled, a malicious person can trigger undefined behavior. 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:37:39 UTC

Technical Analysis

CVE-2022-23587 is a medium-severity vulnerability affecting the TensorFlow open-source machine learning framework, specifically within its Grappler optimization component. The issue arises from an integer overflow or wraparound (CWE-190) during the cost estimation process for the 'crop and resize' operation. This operation involves user-controlled cropping parameters. When these parameters are maliciously crafted, they can trigger an integer overflow in the calculation logic. Integer overflows can lead to undefined behavior, including memory corruption, logic errors, or crashes, potentially allowing an attacker to disrupt the normal functioning of the TensorFlow process or cause denial of service. The vulnerability affects TensorFlow versions prior to 2.5.3, versions between 2.6.0 and 2.6.3, and versions between 2.7.0 and 2.7.1. The fix for this vulnerability is included starting with TensorFlow 2.8.0, with backported patches planned for the affected supported versions. There are no known exploits in the wild at the time of reporting. Exploitation requires supplying malicious input parameters to the crop and resize functionality, which may be exposed in environments where TensorFlow processes untrusted data or user inputs. Since TensorFlow is widely used for machine learning model training and inference, especially in cloud and enterprise environments, this vulnerability could impact systems that incorporate TensorFlow pipelines processing external or untrusted data sources.

Potential Impact

For European organizations, the impact of CVE-2022-23587 depends largely on the deployment context of TensorFlow. Organizations using TensorFlow for machine learning workloads that process untrusted or user-supplied data are at risk of service disruption or potential denial of service due to crashes or undefined behavior triggered by the integer overflow. This could affect sectors such as finance, healthcare, automotive, and manufacturing, where AI/ML models are increasingly integrated into critical workflows. Disruption of ML pipelines could delay decision-making, degrade service quality, or cause operational downtime. While there is no evidence of remote code execution or data exfiltration, the integrity and availability of ML services could be compromised. European organizations relying on TensorFlow in cloud environments or exposed APIs should be particularly vigilant. The vulnerability does not require authentication but does require the ability to supply crafted input parameters, so exposure depends on the accessibility of TensorFlow services to potentially malicious users. Given the widespread adoption of TensorFlow in research institutions and enterprises across Europe, the vulnerability poses a moderate risk to the confidentiality, integrity, and availability of affected systems.

Mitigation Recommendations

To mitigate this vulnerability, European organizations should: 1) Upgrade TensorFlow installations to version 2.8.0 or later, or apply the backported patches for versions 2.5.3, 2.6.3, and 2.7.1 as soon as they become available. 2) Implement strict input validation and sanitization on all user-controlled parameters related to image cropping and resizing before they reach the TensorFlow Grappler component. This can prevent maliciously crafted inputs from triggering the overflow. 3) Restrict access to TensorFlow services that process external inputs by enforcing network segmentation, authentication, and authorization controls to limit exposure to untrusted users. 4) Monitor TensorFlow logs and system behavior for signs of crashes or anomalous activity that could indicate exploitation attempts. 5) For cloud deployments, leverage cloud provider security features such as Web Application Firewalls (WAFs) and runtime protection to detect and block malformed requests targeting TensorFlow APIs. 6) Conduct security reviews of ML pipelines to identify any components that accept user input for image processing and ensure they are hardened against input manipulation. These steps go beyond generic patching by emphasizing input validation, access control, and monitoring tailored to the nature of this vulnerability.

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: 682d9848c4522896dcbf61e8

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

Last enriched: 6/22/2025, 3:37:39 AM

Last updated: 8/15/2025, 3:15:47 PM

Views: 16

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