CVE-2022-41880: CWE-125: Out-of-bounds Read in tensorflow tensorflow
TensorFlow is an open source platform for machine learning. When the `BaseCandidateSamplerOp` function receives a value in `true_classes` larger than `range_max`, a heap oob read occurs. We have patched the issue in GitHub commit b389f5c944cadfdfe599b3f1e4026e036f30d2d4. The fix will be included in TensorFlow 2.11. We will also cherrypick this commit on TensorFlow 2.10.1, 2.9.3, and TensorFlow 2.8.4, as these are also affected and still in supported range.
AI Analysis
Technical Summary
CVE-2022-41880 is a medium-severity vulnerability identified in TensorFlow, an open-source machine learning platform widely used for developing and deploying machine learning models. The vulnerability arises from an out-of-bounds (OOB) read condition in the BaseCandidateSamplerOp function. Specifically, when the function receives a value in the 'true_classes' input parameter that exceeds the 'range_max' value, it triggers a heap-based out-of-bounds read. This means the function attempts to read memory beyond the allocated buffer, which can lead to undefined behavior such as application crashes or potential leakage of sensitive information from adjacent memory regions. The issue affects TensorFlow versions prior to 2.8.4, as well as versions 2.9.0 up to but not including 2.9.3, and versions 2.10.0 up to but not including 2.10.1. The vulnerability was addressed in a GitHub commit (b389f5c944cadfdfe599b3f1e4026e036f30d2d4) and the fix has been backported to supported TensorFlow releases 2.8.4, 2.9.3, and 2.10.1. No known exploits have been reported in the wild to date. The vulnerability is classified under CWE-125 (Out-of-bounds Read), which typically impacts confidentiality and stability of applications but does not directly allow code execution. Exploitation requires feeding crafted inputs to the BaseCandidateSamplerOp function, which is part of TensorFlow's sampling operations used in training or inference pipelines. Since TensorFlow is often integrated into larger systems and services, the vulnerability could be triggered remotely if the affected TensorFlow instance processes untrusted input data. However, exploitation complexity is moderate as it requires specific input conditions and knowledge of the internal TensorFlow API usage. No authentication or user interaction is explicitly required if the vulnerable TensorFlow service is exposed to untrusted data sources.
Potential Impact
For European organizations, the impact of CVE-2022-41880 depends largely on the extent of TensorFlow adoption within their machine learning infrastructure. Organizations leveraging TensorFlow versions prior to the patched releases in critical AI/ML workloads could face risks of application instability or information leakage due to out-of-bounds memory reads. This could affect data confidentiality, especially if sensitive training data or model parameters reside in memory regions adjacent to the OOB read. Additionally, service availability could be impacted if the vulnerability causes crashes or memory corruption. Sectors such as finance, healthcare, automotive, and telecommunications, which increasingly rely on AI/ML models for decision-making and automation, may be particularly sensitive to disruptions or data leaks. While no remote code execution is indicated, the vulnerability could be leveraged as part of a broader attack chain to gain further foothold or reconnaissance within affected systems. Given the widespread use of TensorFlow in research institutions and enterprises across Europe, unpatched systems represent a potential attack vector. However, the absence of known exploits and the medium severity rating suggest the immediate risk is moderate but warrants timely remediation to prevent future exploitation.
Mitigation Recommendations
European organizations should prioritize upgrading TensorFlow installations to the patched versions: 2.8.4, 2.9.3, 2.10.1, or later. Specifically, ensure that any TensorFlow deployment in production or exposed environments is updated promptly to eliminate the out-of-bounds read vulnerability. For organizations unable to upgrade immediately, applying the specific GitHub patch commit (b389f5c944cadfdfe599b3f1e4026e036f30d2d4) manually to affected versions can serve as an interim mitigation. Additionally, organizations should audit their machine learning pipelines to identify where BaseCandidateSamplerOp is used and validate input data rigorously to prevent out-of-range values in 'true_classes'. Implementing strict input validation and sanitization at the application layer can reduce the risk of triggering the vulnerability. Monitoring and logging TensorFlow runtime errors or crashes can help detect exploitation attempts or anomalous behavior. Network segmentation and limiting exposure of TensorFlow services to trusted internal networks can further reduce attack surface. Finally, organizations should incorporate this vulnerability into their vulnerability management and patching workflows, ensuring that TensorFlow dependencies are regularly reviewed and updated.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Belgium, Italy, Spain, Poland
CVE-2022-41880: CWE-125: Out-of-bounds Read in tensorflow tensorflow
Description
TensorFlow is an open source platform for machine learning. When the `BaseCandidateSamplerOp` function receives a value in `true_classes` larger than `range_max`, a heap oob read occurs. We have patched the issue in GitHub commit b389f5c944cadfdfe599b3f1e4026e036f30d2d4. The fix will be included in TensorFlow 2.11. We will also cherrypick this commit on TensorFlow 2.10.1, 2.9.3, and TensorFlow 2.8.4, as these are also affected and still in supported range.
AI-Powered Analysis
Technical Analysis
CVE-2022-41880 is a medium-severity vulnerability identified in TensorFlow, an open-source machine learning platform widely used for developing and deploying machine learning models. The vulnerability arises from an out-of-bounds (OOB) read condition in the BaseCandidateSamplerOp function. Specifically, when the function receives a value in the 'true_classes' input parameter that exceeds the 'range_max' value, it triggers a heap-based out-of-bounds read. This means the function attempts to read memory beyond the allocated buffer, which can lead to undefined behavior such as application crashes or potential leakage of sensitive information from adjacent memory regions. The issue affects TensorFlow versions prior to 2.8.4, as well as versions 2.9.0 up to but not including 2.9.3, and versions 2.10.0 up to but not including 2.10.1. The vulnerability was addressed in a GitHub commit (b389f5c944cadfdfe599b3f1e4026e036f30d2d4) and the fix has been backported to supported TensorFlow releases 2.8.4, 2.9.3, and 2.10.1. No known exploits have been reported in the wild to date. The vulnerability is classified under CWE-125 (Out-of-bounds Read), which typically impacts confidentiality and stability of applications but does not directly allow code execution. Exploitation requires feeding crafted inputs to the BaseCandidateSamplerOp function, which is part of TensorFlow's sampling operations used in training or inference pipelines. Since TensorFlow is often integrated into larger systems and services, the vulnerability could be triggered remotely if the affected TensorFlow instance processes untrusted input data. However, exploitation complexity is moderate as it requires specific input conditions and knowledge of the internal TensorFlow API usage. No authentication or user interaction is explicitly required if the vulnerable TensorFlow service is exposed to untrusted data sources.
Potential Impact
For European organizations, the impact of CVE-2022-41880 depends largely on the extent of TensorFlow adoption within their machine learning infrastructure. Organizations leveraging TensorFlow versions prior to the patched releases in critical AI/ML workloads could face risks of application instability or information leakage due to out-of-bounds memory reads. This could affect data confidentiality, especially if sensitive training data or model parameters reside in memory regions adjacent to the OOB read. Additionally, service availability could be impacted if the vulnerability causes crashes or memory corruption. Sectors such as finance, healthcare, automotive, and telecommunications, which increasingly rely on AI/ML models for decision-making and automation, may be particularly sensitive to disruptions or data leaks. While no remote code execution is indicated, the vulnerability could be leveraged as part of a broader attack chain to gain further foothold or reconnaissance within affected systems. Given the widespread use of TensorFlow in research institutions and enterprises across Europe, unpatched systems represent a potential attack vector. However, the absence of known exploits and the medium severity rating suggest the immediate risk is moderate but warrants timely remediation to prevent future exploitation.
Mitigation Recommendations
European organizations should prioritize upgrading TensorFlow installations to the patched versions: 2.8.4, 2.9.3, 2.10.1, or later. Specifically, ensure that any TensorFlow deployment in production or exposed environments is updated promptly to eliminate the out-of-bounds read vulnerability. For organizations unable to upgrade immediately, applying the specific GitHub patch commit (b389f5c944cadfdfe599b3f1e4026e036f30d2d4) manually to affected versions can serve as an interim mitigation. Additionally, organizations should audit their machine learning pipelines to identify where BaseCandidateSamplerOp is used and validate input data rigorously to prevent out-of-range values in 'true_classes'. Implementing strict input validation and sanitization at the application layer can reduce the risk of triggering the vulnerability. Monitoring and logging TensorFlow runtime errors or crashes can help detect exploitation attempts or anomalous behavior. Network segmentation and limiting exposure of TensorFlow services to trusted internal networks can further reduce attack surface. Finally, organizations should incorporate this vulnerability into their vulnerability management and patching workflows, ensuring that TensorFlow dependencies are regularly reviewed and updated.
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-09-30T00:00:00.000Z
- Cisa Enriched
- true
Threat ID: 682d9849c4522896dcbf6c92
Added to database: 5/21/2025, 9:09:29 AM
Last enriched: 6/21/2025, 9:23:15 PM
Last updated: 8/14/2025, 12:27:24 AM
Views: 11
Related Threats
CVE-2025-8878: CWE-94 Improper Control of Generation of Code ('Code Injection') in properfraction Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress
MediumCVE-2025-8143: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in pencidesign Soledad
MediumCVE-2025-8142: CWE-98 Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') in pencidesign Soledad
HighCVE-2025-8105: CWE-94 Improper Control of Generation of Code ('Code Injection') in pencidesign Soledad
HighCVE-2025-8719: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in reubenthiessen Translate This gTranslate Shortcode
MediumActions
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.