Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

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

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

Description

Tensorflow is an Open Source Machine Learning Framework. The implementation of `OpLevelCostEstimator::CalculateOutputSize` is vulnerable to an integer overflow if an attacker can create an operation which would involve tensors with large enough number of elements. We can have a large enough number of dimensions in `output_shape.dim()` or just a small number of dimensions being large enough to cause an overflow in the multiplication. 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, 04:06:01 UTC

Technical Analysis

CVE-2022-23576 is a medium-severity vulnerability affecting the TensorFlow open-source machine learning framework. The flaw resides in the implementation of the function OpLevelCostEstimator::CalculateOutputSize, which calculates the output tensor size based on the dimensions of the output shape. Specifically, the vulnerability is an integer overflow or wraparound (CWE-190) that occurs when the multiplication of the dimensions in output_shape.dim() results in a value exceeding the maximum representable integer size. This can happen either by having a large number of dimensions or by having one or more dimensions with very large sizes. When this overflow occurs, the calculated output size becomes incorrect, potentially leading to memory allocation errors, buffer overflows, or other undefined behaviors during tensor operations. The vulnerability affects TensorFlow versions prior to 2.5.3, versions between 2.6.0 and before 2.6.3, and versions between 2.7.0 and before 2.7.1. The issue was addressed in TensorFlow 2.8.0 and backported to supported versions 2.7.1, 2.6.3, and 2.5.3. No known exploits have been reported in the wild. Exploitation requires the attacker to craft operations involving tensors with maliciously large dimensions to trigger the overflow during output size calculation. This vulnerability could be leveraged in scenarios where untrusted or user-supplied tensor shapes are processed without adequate validation, potentially leading to denial of service or memory corruption. However, exploitation complexity is moderate as it requires detailed knowledge of the TensorFlow internals and the ability to influence tensor shapes processed by the system.

Potential Impact

For European organizations, the impact of this vulnerability depends largely on their use of TensorFlow in production or research environments. Organizations deploying TensorFlow for machine learning workloads that process untrusted input data or expose model training or inference services to external users could be at risk. Successful exploitation could lead to denial of service conditions by causing crashes or memory exhaustion, disrupting critical AI-driven services such as automated decision-making, predictive analytics, or computer vision applications. In worst cases, memory corruption might be leveraged to execute arbitrary code, though this is less likely without additional vulnerabilities. Given the increasing reliance on AI and machine learning in sectors such as finance, healthcare, manufacturing, and autonomous systems across Europe, this vulnerability could affect the availability and integrity of AI services. Additionally, organizations involved in AI research or cloud service providers offering TensorFlow-based services might face operational disruptions or reputational damage if exploited. However, since no known exploits exist and exploitation requires specific conditions, the immediate risk is moderate but should not be underestimated.

Mitigation Recommendations

European organizations should prioritize upgrading TensorFlow installations to version 2.8.0 or later, or to the patched versions 2.7.1, 2.6.3, or 2.5.3 as applicable. Where immediate upgrades are not feasible, organizations should implement strict input validation and sanitization for tensor shapes, ensuring that dimensions do not exceed safe thresholds to prevent integer overflow during output size calculations. Deploy runtime monitoring to detect abnormal tensor sizes or resource usage spikes that could indicate exploitation attempts. For environments exposing TensorFlow services externally, apply network segmentation and access controls to limit exposure to untrusted inputs. Additionally, conduct code reviews and security testing focused on tensor operations to identify potential misuse or unsafe handling of tensor dimensions. Incorporate fuzz testing targeting tensor shape inputs to proactively discover similar vulnerabilities. Finally, maintain awareness of TensorFlow security advisories and apply patches promptly to reduce exposure.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

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

Threat ID: 682d9848c4522896dcbf618b

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

Last enriched: 6/22/2025, 4:06:01 AM

Last updated: 2/2/2026, 10:05:41 PM

Views: 46

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

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

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats