Skip to main content

CVE-2022-35965: CWE-476: NULL Pointer Dereference in tensorflow tensorflow

Medium
Published: Fri Sep 16 2022 (09/16/2022, 20:25:09 UTC)
Source: CVE
Vendor/Project: tensorflow
Product: tensorflow

Description

TensorFlow is an open source platform for machine learning. If `LowerBound` or `UpperBound` is given an empty`sorted_inputs` input, it results in a `nullptr` dereference, leading to a segfault that can be used to trigger a denial of service attack. We have patched the issue in GitHub commit bce3717eaef4f769019fd18e990464ca4a2efeea. 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, 20:06:56 UTC

Technical Analysis

CVE-2022-35965 is a vulnerability identified in TensorFlow, an open-source machine learning platform widely used for developing and deploying machine learning models. The issue arises from a NULL pointer dereference (CWE-476) in the handling of the `LowerBound` or `UpperBound` operations when provided with an empty `sorted_inputs` array. Specifically, if these operations receive an empty input, the code attempts to dereference a nullptr, causing a segmentation fault (segfault). This segfault can be exploited to trigger a denial of service (DoS) attack, effectively crashing the application or service relying on TensorFlow. The vulnerability affects TensorFlow versions prior to 2.7.2, versions 2.8.0 up to but not including 2.8.1, and versions 2.9.0 up to but not including 2.9.1. The issue has been patched in TensorFlow 2.10.0 and backported to versions 2.7.2, 2.8.1, and 2.9.1. No known workarounds exist, meaning that updating to a fixed version is the primary remediation. There are no known exploits in the wild at this time. The vulnerability does not require authentication or user interaction to be triggered, but it requires the attacker to supply crafted inputs to the affected TensorFlow operations. The impact is limited to denial of service via application crash, with no indication of code execution or data compromise.

Potential Impact

For European organizations, the primary impact of CVE-2022-35965 is the potential disruption of services or applications that utilize vulnerable TensorFlow versions for machine learning workloads. This could affect industries relying heavily on AI/ML, such as finance, healthcare, automotive, and manufacturing, where TensorFlow is integrated into critical systems for predictive analytics, automation, or decision-making. A successful denial of service attack could lead to downtime, loss of availability of AI-powered services, and operational delays. While the vulnerability does not directly compromise confidentiality or integrity, the unavailability of machine learning services could indirectly affect business continuity and service-level agreements. Organizations running TensorFlow in production environments, especially those exposing APIs or services that process external inputs, are at higher risk. Given the lack of known exploits, the immediate threat is moderate, but the widespread use of TensorFlow in Europe means that unpatched systems could be targeted in the future. The absence of workarounds emphasizes the importance of timely patching to maintain service availability.

Mitigation Recommendations

1. Immediate upgrade to patched TensorFlow versions: Organizations should prioritize upgrading to TensorFlow 2.10.0 or later, or apply backported patches available in versions 2.7.2, 2.8.1, and 2.9.1. 2. Input validation: Implement strict validation and sanitization of inputs passed to TensorFlow operations, especially those involving `LowerBound` and `UpperBound`, to ensure that empty or malformed inputs are rejected before processing. 3. Runtime monitoring: Deploy application and infrastructure monitoring to detect abnormal crashes or segfaults in TensorFlow-based services, enabling rapid incident response. 4. Isolation and rate limiting: Where possible, isolate TensorFlow services behind API gateways or proxies that can enforce rate limiting and input validation to reduce exposure to malicious inputs. 5. Code review and testing: For organizations developing custom TensorFlow models or extensions, conduct thorough code reviews and fuzz testing to identify similar null pointer dereference issues. 6. Incident response planning: Prepare for potential denial of service incidents by having failover mechanisms and backup systems to maintain availability of critical AI/ML services.

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

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

Last enriched: 6/22/2025, 8:06:56 PM

Last updated: 8/15/2025, 10:11:34 AM

Views: 13

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