Skip to main content

CVE-2022-36017: CWE-20: Improper Input Validation in tensorflow tensorflow

Medium
Published: Fri Sep 16 2022 (09/16/2022, 22:50:10 UTC)
Source: CVE
Vendor/Project: tensorflow
Product: tensorflow

Description

TensorFlow is an open source platform for machine learning. If `Requantize` is given `input_min`, `input_max`, `requested_output_min`, `requested_output_max` tensors of a nonzero rank, it results in a segfault that can be used to trigger a denial of service attack. We have patched the issue in GitHub commit 785d67a78a1d533759fcd2f5e8d6ef778de849e0. 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, 17:21:32 UTC

Technical Analysis

CVE-2022-36017 is a medium-severity vulnerability in TensorFlow, an open-source machine learning platform widely used for developing and deploying machine learning models. The vulnerability arises from improper input validation (CWE-20) in the 'Requantize' operation. Specifically, when the 'Requantize' function receives tensors for the parameters 'input_min', 'input_max', 'requested_output_min', or 'requested_output_max' that have a nonzero rank (i.e., are not scalar values as expected), it triggers a segmentation fault (segfault). This segfault can be exploited to cause a denial of service (DoS) condition, crashing the application or service using TensorFlow. The issue affects multiple TensorFlow versions: all versions prior to 2.7.2, versions from 2.8.0 up to but not including 2.8.1, and versions from 2.9.0 up to but not including 2.9.1. The vulnerability was patched in GitHub commit 785d67a78a1d533759fcd2f5e8d6ef778de849e0 and included in TensorFlow 2.10.0, with backported fixes for 2.7.2, 2.8.1, and 2.9.1. No known workarounds exist, and no exploits have been observed in the wild. The root cause is the lack of proper validation of input tensor shapes before processing, which leads to memory access violations and crashes. This vulnerability impacts the availability of services relying on TensorFlow for machine learning inference or training, especially in environments where untrusted input could be supplied to the 'Requantize' operation. Since TensorFlow is often embedded in larger applications or services, a successful DoS could disrupt critical AI-driven functionalities.

Potential Impact

For European organizations, the impact of CVE-2022-36017 primarily concerns availability disruptions in machine learning services that utilize affected TensorFlow versions. Industries such as finance, healthcare, automotive, and manufacturing increasingly rely on AI/ML models for decision-making, automation, and predictive analytics. A denial of service attack exploiting this vulnerability could interrupt these services, leading to operational downtime, degraded service quality, and potential financial losses. While the vulnerability does not directly compromise confidentiality or integrity, the loss of availability can have cascading effects, such as delayed processing of critical data or interruption of automated control systems. Organizations deploying TensorFlow in cloud environments, edge devices, or embedded systems are at risk if they process untrusted or malformed input data that triggers the segfault. Additionally, AI service providers and research institutions using affected TensorFlow versions may face service interruptions impacting users and dependent applications. Given the lack of known exploits, the immediate risk is moderate; however, the widespread use of TensorFlow in Europe means that unpatched systems could be targeted in the future, especially as adversaries seek to disrupt AI-dependent operations.

Mitigation Recommendations

To mitigate this vulnerability, 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 primary defense. Organizations should audit their environments to identify all instances of TensorFlow in use, including embedded deployments and containerized applications, to ensure comprehensive coverage. Input validation should be reinforced at the application level by sanitizing and verifying tensor shapes before passing them to the 'Requantize' operation, thereby adding an additional layer of defense against malformed inputs. Monitoring and logging should be enhanced to detect abnormal crashes or segfaults in TensorFlow processes, enabling rapid incident response. For environments processing untrusted input, consider implementing strict input filtering or sandboxing TensorFlow workloads to limit the impact of potential DoS attempts. Finally, organizations should review their machine learning pipeline security policies to incorporate regular vulnerability scanning and timely patch management for AI frameworks.

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

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

Last enriched: 6/22/2025, 5:21:32 PM

Last updated: 8/12/2025, 1:34:01 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