Skip to main content

CVE-2022-21733: n/a in n/a

Medium
VulnerabilityCVE-2022-21733cvecve-2022-21733
Published: Thu Feb 03 2022 (02/03/2022, 11:28:10 UTC)
Source: CVE
Vendor/Project: n/a
Product: n/a

Description

Tensorflow is an Open Source Machine Learning Framework. The implementation of `StringNGrams` can be used to trigger a denial of service attack by causing an out of memory condition after an integer overflow. We are missing a validation on `pad_witdh` and that result in computing a negative value for `ngram_width` which is later used to allocate parts of the output. 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: 07/06/2025, 23:26:21 UTC

Technical Analysis

CVE-2022-21733 is a medium-severity vulnerability affecting TensorFlow, an open-source machine learning framework widely used for developing and deploying machine learning models. The vulnerability arises from improper validation in the implementation of the StringNGrams operation, specifically related to the parameter 'pad_width'. Due to missing validation, an integer overflow can occur when computing the 'ngram_width' value, which may become negative. This negative value is then used to allocate memory for parts of the output, leading to an out-of-memory condition. Exploiting this flaw can trigger a denial of service (DoS) attack by exhausting system memory resources. The vulnerability affects multiple TensorFlow versions, including 2.5.3, 2.6.3, 2.7.1, and will be fixed in 2.8.0. The CVSS v3.1 base score is 4.3, indicating medium severity, with an attack vector of network, low attack complexity, requiring privileges, no user interaction, and impacting availability only. No known exploits are reported in the wild. The root cause is a CWE-190 (Integer Overflow or Wraparound) weakness, which is a common source of memory corruption and resource exhaustion issues. The fix involves proper validation of the 'pad_width' parameter to prevent negative or overflowed values from being used in memory allocation.

Potential Impact

For European organizations, the impact of this vulnerability primarily concerns availability disruptions in systems utilizing affected TensorFlow versions, especially those processing text data with the StringNGrams operation. Organizations deploying machine learning models in production environments or offering ML-based services could experience service outages or degraded performance due to memory exhaustion triggered by crafted inputs. While the vulnerability does not impact confidentiality or integrity directly, denial of service can affect critical applications in sectors such as finance, healthcare, telecommunications, and manufacturing, where TensorFlow is increasingly adopted. Given the network attack vector and low complexity, an attacker with limited privileges on a system running vulnerable TensorFlow versions could remotely cause service interruptions, potentially impacting business continuity. However, the requirement for privileges limits exploitation to insiders or compromised accounts. The absence of known exploits reduces immediate risk but does not eliminate the threat, especially as TensorFlow is widely used across Europe in research institutions, enterprises, and cloud services.

Mitigation Recommendations

European organizations should promptly update TensorFlow to version 2.8.0 or later, or apply backported patches available for versions 2.5.3, 2.6.3, and 2.7.1. Where immediate patching is not feasible, organizations should implement input validation controls to sanitize or restrict inputs to the StringNGrams operation, preventing maliciously crafted parameters that could trigger integer overflow. Monitoring and limiting resource usage of TensorFlow processes can help detect and mitigate potential DoS attempts. Additionally, enforcing the principle of least privilege to restrict access to systems running TensorFlow reduces the risk of exploitation by unauthorized users. Organizations should also review their machine learning pipelines for exposure to untrusted inputs and consider deploying runtime protections such as memory usage limits and anomaly detection. Finally, maintaining up-to-date threat intelligence and vulnerability management processes will ensure timely response to emerging exploits.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2021-11-16T00:00:00.000Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d981ec4522896dcbdbecd

Added to database: 5/21/2025, 9:08:46 AM

Last enriched: 7/6/2025, 11:26:21 PM

Last updated: 8/11/2025, 4:25:21 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