Skip to main content

CVE-2022-23593: CWE-754: Improper Check for Unusual or Exceptional Conditions in tensorflow tensorflow

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

Description

Tensorflow is an Open Source Machine Learning Framework. The `simplifyBroadcast` function in the MLIR-TFRT infrastructure in TensorFlow is vulnerable to a segfault (hence, denial of service), if called with scalar shapes. If all shapes are scalar, then `maxRank` is 0, so we build an empty `SmallVector`. The fix will be included in TensorFlow 2.8.0. This is the only affected version.

AI-Powered Analysis

AILast updated: 06/22/2025, 03:36:13 UTC

Technical Analysis

CVE-2022-23593 is a medium-severity vulnerability affecting TensorFlow versions from 2.7.0 up to, but not including, 2.8.0. TensorFlow is a widely used open-source machine learning framework. The vulnerability resides in the `simplifyBroadcast` function within the MLIR-TFRT (Multi-Level Intermediate Representation - TensorFlow Runtime) infrastructure. Specifically, when this function is called with scalar shapes, it can cause a segmentation fault leading to a denial of service (DoS). The root cause is an improper check for unusual or exceptional conditions (CWE-754). When all input shapes are scalar, the variable `maxRank` is set to zero, which results in the construction of an empty `SmallVector`. This edge case is not handled correctly, causing the function to crash. The issue is fixed in TensorFlow version 2.8.0. No known exploits are currently reported in the wild. The vulnerability does not require authentication or user interaction to be triggered, but it requires the attacker to have the ability to invoke the vulnerable function with crafted scalar shapes, which typically means some level of access to the TensorFlow runtime environment or the ability to submit inputs to a TensorFlow-based service. The impact is primarily denial of service through application crash rather than data compromise or code execution.

Potential Impact

For European organizations, the primary impact of this vulnerability is the potential for denial of service in systems utilizing the affected TensorFlow versions. This can disrupt machine learning workloads, data processing pipelines, and AI-driven services that rely on TensorFlow 2.7.x. Organizations in sectors such as finance, healthcare, manufacturing, and research that deploy TensorFlow models in production environments may experience service interruptions, leading to operational delays and potential financial losses. Since the vulnerability causes a crash rather than data leakage or remote code execution, the confidentiality and integrity of data are less at risk. However, availability degradation can impact critical AI services, especially those integrated into real-time decision-making systems or customer-facing applications. The lack of known exploits reduces immediate risk, but the widespread use of TensorFlow means that unpatched systems remain vulnerable to potential future attacks or accidental crashes triggered by malformed inputs.

Mitigation Recommendations

European organizations should prioritize upgrading TensorFlow installations from versions 2.7.0 up to 2.7.x to version 2.8.0 or later, where the vulnerability is fixed. For environments where immediate upgrade is not feasible, implement input validation and sanitization to prevent scalar-only shapes from being passed to the `simplifyBroadcast` function or equivalent MLIR-TFRT components. Monitoring and logging should be enhanced to detect abnormal crashes or segmentation faults in TensorFlow services, enabling rapid incident response. Additionally, isolating TensorFlow workloads in containerized or sandboxed environments can limit the impact of a crash on broader systems. Organizations should also review their machine learning pipelines to identify any external interfaces that accept shape inputs and apply strict validation rules. Finally, maintaining an inventory of TensorFlow versions in use across the organization will help ensure timely patching and vulnerability management.

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

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

Last enriched: 6/22/2025, 3:36:13 AM

Last updated: 8/3/2025, 1:00:01 AM

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