CVE-2022-23558: CWE-190: Integer Overflow or Wraparound in tensorflow tensorflow
Tensorflow is an Open Source Machine Learning Framework. An attacker can craft a TFLite model that would cause an integer overflow in `TfLiteIntArrayCreate`. The `TfLiteIntArrayGetSizeInBytes` returns an `int` instead of a `size_t. An attacker can control model inputs such that `computed_size` overflows the size of `int` datatype. 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 Analysis
Technical Summary
CVE-2022-23558 is a medium-severity vulnerability in the TensorFlow open-source machine learning framework, specifically affecting certain versions prior to 2.7.1, 2.6.3, and 2.5.3. The vulnerability arises from an integer overflow or wraparound issue (CWE-190) in the function TfLiteIntArrayCreate, which is used in the TensorFlow Lite (TFLite) component. The root cause is that the function TfLiteIntArrayGetSizeInBytes returns an int type instead of a size_t, which can lead to an integer overflow when calculating the size of an array. An attacker can craft a malicious TFLite model with inputs that cause the computed size to exceed the maximum value representable by an int, resulting in an overflow. This can lead to memory corruption, potentially causing crashes, denial of service, or even arbitrary code execution depending on the context in which the vulnerable function is used. The flaw affects multiple TensorFlow versions that are still supported, and patches have been planned for TensorFlow 2.8.0 and backported to earlier supported versions. No known exploits have been reported in the wild as of the publication date. The vulnerability requires the attacker to supply a malicious TFLite model, which implies some level of access or interaction with the system that processes these models. The issue impacts the integrity and availability of systems running vulnerable TensorFlow versions, particularly those that process untrusted or user-supplied TFLite models.
Potential Impact
For European organizations, the impact of this vulnerability depends largely on their use of TensorFlow, especially TensorFlow Lite, in production environments. Organizations involved in AI/ML development, edge computing, IoT devices, or mobile applications that utilize TFLite models are at risk. Exploitation could lead to denial of service or potentially remote code execution if the malicious model is processed by vulnerable systems, undermining system integrity and availability. This could disrupt critical AI-driven services, including healthcare diagnostics, financial modeling, autonomous systems, and industrial automation, which are increasingly prevalent in Europe. Additionally, organizations that rely on third-party AI solutions embedding vulnerable TensorFlow versions may be indirectly affected. The confidentiality impact is limited unless the vulnerability is chained with other exploits. Given the growing adoption of AI technologies in European industries, the vulnerability poses a moderate risk to operational continuity and trustworthiness of AI systems.
Mitigation Recommendations
European organizations should prioritize upgrading TensorFlow to versions 2.7.1, 2.6.3, 2.5.3 or later, where the integer overflow issue is patched. For environments where immediate upgrade is not feasible, organizations should implement strict validation and sanitization of all TFLite models before processing, including verifying model provenance and integrity. Deploy runtime protections such as sandboxing or containerization to isolate TensorFlow processes handling untrusted models, limiting the impact of potential exploitation. Monitoring for abnormal crashes or behavior in AI model processing pipelines can help detect exploitation attempts. Additionally, organizations should review their supply chain and third-party AI components to ensure they do not incorporate vulnerable TensorFlow versions. Incorporating static and dynamic analysis tools to detect unsafe integer operations in custom AI model processing code can further reduce risk. Finally, educating developers and AI engineers about secure model handling and patch management is critical to maintaining a secure AI infrastructure.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain, Belgium, Poland
CVE-2022-23558: CWE-190: Integer Overflow or Wraparound in tensorflow tensorflow
Description
Tensorflow is an Open Source Machine Learning Framework. An attacker can craft a TFLite model that would cause an integer overflow in `TfLiteIntArrayCreate`. The `TfLiteIntArrayGetSizeInBytes` returns an `int` instead of a `size_t. An attacker can control model inputs such that `computed_size` overflows the size of `int` datatype. 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
Technical Analysis
CVE-2022-23558 is a medium-severity vulnerability in the TensorFlow open-source machine learning framework, specifically affecting certain versions prior to 2.7.1, 2.6.3, and 2.5.3. The vulnerability arises from an integer overflow or wraparound issue (CWE-190) in the function TfLiteIntArrayCreate, which is used in the TensorFlow Lite (TFLite) component. The root cause is that the function TfLiteIntArrayGetSizeInBytes returns an int type instead of a size_t, which can lead to an integer overflow when calculating the size of an array. An attacker can craft a malicious TFLite model with inputs that cause the computed size to exceed the maximum value representable by an int, resulting in an overflow. This can lead to memory corruption, potentially causing crashes, denial of service, or even arbitrary code execution depending on the context in which the vulnerable function is used. The flaw affects multiple TensorFlow versions that are still supported, and patches have been planned for TensorFlow 2.8.0 and backported to earlier supported versions. No known exploits have been reported in the wild as of the publication date. The vulnerability requires the attacker to supply a malicious TFLite model, which implies some level of access or interaction with the system that processes these models. The issue impacts the integrity and availability of systems running vulnerable TensorFlow versions, particularly those that process untrusted or user-supplied TFLite models.
Potential Impact
For European organizations, the impact of this vulnerability depends largely on their use of TensorFlow, especially TensorFlow Lite, in production environments. Organizations involved in AI/ML development, edge computing, IoT devices, or mobile applications that utilize TFLite models are at risk. Exploitation could lead to denial of service or potentially remote code execution if the malicious model is processed by vulnerable systems, undermining system integrity and availability. This could disrupt critical AI-driven services, including healthcare diagnostics, financial modeling, autonomous systems, and industrial automation, which are increasingly prevalent in Europe. Additionally, organizations that rely on third-party AI solutions embedding vulnerable TensorFlow versions may be indirectly affected. The confidentiality impact is limited unless the vulnerability is chained with other exploits. Given the growing adoption of AI technologies in European industries, the vulnerability poses a moderate risk to operational continuity and trustworthiness of AI systems.
Mitigation Recommendations
European organizations should prioritize upgrading TensorFlow to versions 2.7.1, 2.6.3, 2.5.3 or later, where the integer overflow issue is patched. For environments where immediate upgrade is not feasible, organizations should implement strict validation and sanitization of all TFLite models before processing, including verifying model provenance and integrity. Deploy runtime protections such as sandboxing or containerization to isolate TensorFlow processes handling untrusted models, limiting the impact of potential exploitation. Monitoring for abnormal crashes or behavior in AI model processing pipelines can help detect exploitation attempts. Additionally, organizations should review their supply chain and third-party AI components to ensure they do not incorporate vulnerable TensorFlow versions. Incorporating static and dynamic analysis tools to detect unsafe integer operations in custom AI model processing code can further reduce risk. Finally, educating developers and AI engineers about secure model handling and patch management is critical to maintaining a secure AI infrastructure.
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-01-19T00:00:00.000Z
- Cisa Enriched
- true
Threat ID: 682d9848c4522896dcbf624b
Added to database: 5/21/2025, 9:09:28 AM
Last enriched: 6/22/2025, 3:21:38 AM
Last updated: 7/31/2025, 1:13:41 PM
Views: 11
Related Threats
CVE-2025-9091: Hard-coded Credentials in Tenda AC20
LowCVE-2025-9090: Command Injection in Tenda AC20
MediumCVE-2025-9092: CWE-400 Uncontrolled Resource Consumption in Legion of the Bouncy Castle Inc. Bouncy Castle for Java - BC-FJA 2.1.0
LowCVE-2025-9089: Stack-based Buffer Overflow in Tenda AC20
HighCVE-2025-9088: Stack-based Buffer Overflow in Tenda AC20
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.