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-29204: CWE-191: Integer Underflow (Wrap or Wraparound) in tensorflow tensorflow

0
Medium
Published: Fri May 20 2022 (05/20/2022, 22:40:13 UTC)
Source: CVE
Vendor/Project: tensorflow
Product: tensorflow

Description

TensorFlow is an open source platform for machine learning. Prior to versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4, the implementation of `tf.raw_ops.UnsortedSegmentJoin` does not fully validate the input arguments. This results in a `CHECK`-failure which can be used to trigger a denial of service attack. The code assumes `num_segments` is a positive scalar but there is no validation. Since this value is used to allocate the output tensor, a negative value would result in a `CHECK`-failure (assertion failure), as per TFSA-2021-198. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.

AI-Powered Analysis

AILast updated: 06/22/2025, 01:20:42 UTC

Technical Analysis

CVE-2022-29204 is a medium-severity vulnerability affecting TensorFlow, an open-source machine learning platform widely used for developing and deploying machine learning models. The vulnerability arises from an integer underflow (CWE-191) and improper input validation (CWE-20) in the implementation of the TensorFlow operation `tf.raw_ops.UnsortedSegmentJoin`. Specifically, the function assumes that the parameter `num_segments` is a positive scalar but does not validate this assumption. If a negative value is supplied for `num_segments`, it leads to an integer underflow during the allocation of the output tensor. This underflow triggers a CHECK failure (assertion failure) within TensorFlow’s internal logic, causing the process to terminate unexpectedly. This behavior can be exploited to cause a denial of service (DoS) attack by crashing applications or services that rely on the affected TensorFlow versions. The vulnerability affects TensorFlow versions prior to 2.6.4, and certain release candidates and versions before 2.7.2, 2.8.1, and 2.9.0. The issue was patched in versions 2.6.4, 2.7.2, 2.8.1, and 2.9.0. There are no known exploits in the wild, and the vulnerability requires that an attacker can supply crafted input to the vulnerable TensorFlow operation, which may require some level of access to the application or environment using TensorFlow. The vulnerability does not allow for code execution or data leakage but can disrupt availability by crashing the service or application using TensorFlow.

Potential Impact

For European organizations, the primary impact of CVE-2022-29204 is the potential for denial of service attacks against applications or services that utilize vulnerable TensorFlow versions. Organizations deploying machine learning models in production environments—such as financial institutions, healthcare providers, automotive companies, and research institutions—may experience service interruptions if an attacker supplies malicious inputs triggering the CHECK failure. This could lead to downtime, loss of availability, and disruption of critical AI-driven processes. While the vulnerability does not directly compromise confidentiality or integrity, the availability impact can affect business continuity and operational reliability. Given the widespread adoption of TensorFlow in AI and data science projects across Europe, especially in sectors investing heavily in AI, the risk is non-negligible. However, exploitation requires the ability to influence input parameters to the vulnerable operation, which may limit the attack surface depending on deployment architecture. No known active exploitation reduces immediate risk but does not eliminate the need for remediation.

Mitigation Recommendations

1. Upgrade TensorFlow to a patched version: Organizations should update to TensorFlow versions 2.6.4, 2.7.2, 2.8.1, 2.9.0, or later, which contain fixes for this vulnerability. 2. Input validation: Implement strict validation on all inputs to TensorFlow operations, especially those that can influence parameters like `num_segments`. Reject or sanitize negative or out-of-range values before they reach TensorFlow. 3. Application-level safeguards: Where possible, encapsulate TensorFlow calls within try-catch blocks or equivalent error handling to gracefully handle unexpected failures and prevent service crashes. 4. Monitoring and alerting: Deploy monitoring to detect abnormal TensorFlow process terminations or crashes that could indicate exploitation attempts. 5. Restrict access: Limit the ability of untrusted users or external entities to supply inputs to TensorFlow operations, reducing the attack surface. 6. Testing and fuzzing: Incorporate fuzz testing or input boundary testing in development pipelines to detect similar input validation issues proactively. 7. Review deployment architecture: For cloud or containerized deployments, use orchestration features to automatically restart failed TensorFlow services to minimize downtime.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

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

Threat ID: 682d9848c4522896dcbf653e

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

Last enriched: 6/22/2025, 1:20:42 AM

Last updated: 2/7/2026, 4:43:16 PM

Views: 36

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