CVE-2022-35972: CWE-20: Improper Input Validation in tensorflow tensorflow
TensorFlow is an open source platform for machine learning. If `QuantizedBiasAdd` is given `min_input`, `max_input`, `min_bias`, `max_bias` 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 Analysis
Technical Summary
CVE-2022-35972 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 due to improper input validation (CWE-20) in the `QuantizedBiasAdd` operation. Specifically, when the tensors `min_input`, `max_input`, `min_bias`, and `max_bias` are provided with a nonzero rank (i.e., multi-dimensional tensors rather than expected scalar or zero-rank tensors), the operation triggers a segmentation fault (segfault). This segfault can be exploited to cause a denial of service (DoS) condition by crashing the process running 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 the fix is included in TensorFlow 2.10.0, with backported patches for 2.7.2, 2.8.1, and 2.9.1. There are no known workarounds, and no known exploits have been reported in the wild. The root cause is insufficient validation of tensor input shapes, which leads to memory access violations and crashes. This vulnerability primarily impacts availability by enabling attackers to crash TensorFlow-based applications or services, potentially disrupting machine learning workflows or dependent systems. Since exploitation requires crafting specific inputs to the vulnerable operation, it may require some level of access to the TensorFlow runtime environment or the ability to influence input data to the affected operation. No authentication or user interaction is explicitly required if the attacker can feed inputs directly to the vulnerable function. Confidentiality and integrity impacts are minimal or nonexistent as the vulnerability does not allow arbitrary code execution or data manipulation beyond causing a crash.
Potential Impact
For European organizations, the primary impact of CVE-2022-35972 is the potential disruption of machine learning services and applications that rely on vulnerable TensorFlow versions. This can affect sectors such as finance, healthcare, automotive, manufacturing, and research institutions that use TensorFlow for critical AI workloads. A denial of service attack could interrupt automated decision-making systems, predictive analytics, or AI-driven operational processes, leading to downtime, loss of productivity, and potential financial losses. Organizations deploying TensorFlow in cloud environments or exposed APIs may be more susceptible if attackers can supply crafted inputs remotely. The lack of known exploits reduces immediate risk, but the widespread adoption of TensorFlow in Europe means that unpatched systems could be targeted in the future. Additionally, disruption in AI services could indirectly affect compliance with regulations requiring service availability and reliability. Since the vulnerability does not allow data exfiltration or code execution, the risk to data confidentiality and integrity is low. However, availability impacts could cascade in environments where AI models are integral to business-critical functions.
Mitigation Recommendations
1. Upgrade 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 as soon as possible to eliminate the vulnerability. 2. Review and restrict access to TensorFlow model serving endpoints and APIs to trusted users and systems to reduce the risk of malicious input injection. 3. Implement input validation and sanitization at the application layer to ensure that tensor inputs conform to expected shapes and ranks before being passed to TensorFlow operations, adding an additional layer of defense. 4. Monitor logs and application behavior for unexpected crashes or segfaults related to TensorFlow processes, enabling early detection of attempted exploitation. 5. For organizations using containerized or cloud-based TensorFlow deployments, enforce strict network segmentation and access controls to limit exposure. 6. Conduct regular dependency audits and vulnerability scanning to identify and remediate outdated TensorFlow versions. 7. Educate development and data science teams about secure coding practices related to input validation in machine learning pipelines to prevent similar issues.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain, Poland, Belgium
CVE-2022-35972: CWE-20: Improper Input Validation in tensorflow tensorflow
Description
TensorFlow is an open source platform for machine learning. If `QuantizedBiasAdd` is given `min_input`, `max_input`, `min_bias`, `max_bias` 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
Technical Analysis
CVE-2022-35972 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 due to improper input validation (CWE-20) in the `QuantizedBiasAdd` operation. Specifically, when the tensors `min_input`, `max_input`, `min_bias`, and `max_bias` are provided with a nonzero rank (i.e., multi-dimensional tensors rather than expected scalar or zero-rank tensors), the operation triggers a segmentation fault (segfault). This segfault can be exploited to cause a denial of service (DoS) condition by crashing the process running 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 the fix is included in TensorFlow 2.10.0, with backported patches for 2.7.2, 2.8.1, and 2.9.1. There are no known workarounds, and no known exploits have been reported in the wild. The root cause is insufficient validation of tensor input shapes, which leads to memory access violations and crashes. This vulnerability primarily impacts availability by enabling attackers to crash TensorFlow-based applications or services, potentially disrupting machine learning workflows or dependent systems. Since exploitation requires crafting specific inputs to the vulnerable operation, it may require some level of access to the TensorFlow runtime environment or the ability to influence input data to the affected operation. No authentication or user interaction is explicitly required if the attacker can feed inputs directly to the vulnerable function. Confidentiality and integrity impacts are minimal or nonexistent as the vulnerability does not allow arbitrary code execution or data manipulation beyond causing a crash.
Potential Impact
For European organizations, the primary impact of CVE-2022-35972 is the potential disruption of machine learning services and applications that rely on vulnerable TensorFlow versions. This can affect sectors such as finance, healthcare, automotive, manufacturing, and research institutions that use TensorFlow for critical AI workloads. A denial of service attack could interrupt automated decision-making systems, predictive analytics, or AI-driven operational processes, leading to downtime, loss of productivity, and potential financial losses. Organizations deploying TensorFlow in cloud environments or exposed APIs may be more susceptible if attackers can supply crafted inputs remotely. The lack of known exploits reduces immediate risk, but the widespread adoption of TensorFlow in Europe means that unpatched systems could be targeted in the future. Additionally, disruption in AI services could indirectly affect compliance with regulations requiring service availability and reliability. Since the vulnerability does not allow data exfiltration or code execution, the risk to data confidentiality and integrity is low. However, availability impacts could cascade in environments where AI models are integral to business-critical functions.
Mitigation Recommendations
1. Upgrade 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 as soon as possible to eliminate the vulnerability. 2. Review and restrict access to TensorFlow model serving endpoints and APIs to trusted users and systems to reduce the risk of malicious input injection. 3. Implement input validation and sanitization at the application layer to ensure that tensor inputs conform to expected shapes and ranks before being passed to TensorFlow operations, adding an additional layer of defense. 4. Monitor logs and application behavior for unexpected crashes or segfaults related to TensorFlow processes, enabling early detection of attempted exploitation. 5. For organizations using containerized or cloud-based TensorFlow deployments, enforce strict network segmentation and access controls to limit exposure. 6. Conduct regular dependency audits and vulnerability scanning to identify and remediate outdated TensorFlow versions. 7. Educate development and data science teams about secure coding practices related to input validation in machine learning pipelines to prevent similar issues.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2022-07-15T00:00:00.000Z
- Cisa Enriched
- true
Threat ID: 682d9845c4522896dcbf4084
Added to database: 5/21/2025, 9:09:25 AM
Last enriched: 6/22/2025, 8:04:59 PM
Last updated: 8/14/2025, 7:05:50 PM
Views: 12
Related Threats
CVE-2025-8991: Business Logic Errors in linlinjava litemall
MediumCVE-2025-8990: SQL Injection in code-projects Online Medicine Guide
MediumCVE-2025-8940: Buffer Overflow in Tenda AC20
HighCVE-2025-8939: Buffer Overflow in Tenda AC20
HighCVE-2025-50518: n/a
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.