CVE-2022-41894: TensorFlow Lite: buffer overflow in CONV_3D_TRANSPOSE op
HIGH PoC AVAILABLE CISA: ATTENDA crafted TFLite model can trigger a heap buffer overflow in the CONV_3D_TRANSPOSE reference kernel, potentially enabling arbitrary code execution. If your org runs TFLite inference (edge, mobile, embedded, server-side) on TF < 2.10.1/2.9.3/2.8.4/2.11, patch immediately. Critically, also audit your model supply chain — the attack requires loading a malicious model file, making model integrity verification as important as patching.
What is the risk?
CVSS 8.1 (High) with network attack vector but high complexity. Real-world exploitability hinges on two conditions: the reference kernel resolver must be active (not the default in optimized/delegate builds), and the attacker must control or inject a TFLite model file. Organizations accepting external models — federated learning hubs, model marketplaces, edge OTA pipelines — face the highest risk. Not in CISA KEV, with no confirmed in-the-wild exploitation, but the attack primitive (malicious model file) is well within reach of capable adversaries.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| TensorFlow | pip | — | No patch |
Do you use TensorFlow? You're affected.
How severe is it?
What is the attack surface?
What should I do?
5 steps-
PATCH
Upgrade to TensorFlow 2.11, 2.10.1, 2.9.3, or 2.8.4 (fix: commit 72c0bdcb25305b0b36842d746cc61d72658d2941).
-
WORKAROUND (if immediate patch is not possible): Block ingestion of untrusted TFLite model files at the application layer; enforce model allowlisting.
-
SUPPLY CHAIN
Implement cryptographic signing and hash verification of all TFLite models before deployment — especially in OTA/federated scenarios.
-
DETECTION
Audit TFLite version across all inference infrastructure; monitor inference processes for anomalous heap errors (SIGSEGV, SIGABRT) that may indicate exploitation attempts.
-
ARCHITECTURE
Prefer XNNPACK or GPU delegates over the reference kernel resolver in production to avoid the vulnerable code path.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2022-41894?
A crafted TFLite model can trigger a heap buffer overflow in the CONV_3D_TRANSPOSE reference kernel, potentially enabling arbitrary code execution. If your org runs TFLite inference (edge, mobile, embedded, server-side) on TF < 2.10.1/2.9.3/2.8.4/2.11, patch immediately. Critically, also audit your model supply chain — the attack requires loading a malicious model file, making model integrity verification as important as patching.
Is CVE-2022-41894 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-41894, increasing the risk of exploitation.
How to fix CVE-2022-41894?
1. PATCH: Upgrade to TensorFlow 2.11, 2.10.1, 2.9.3, or 2.8.4 (fix: commit 72c0bdcb25305b0b36842d746cc61d72658d2941). 2. WORKAROUND (if immediate patch is not possible): Block ingestion of untrusted TFLite model files at the application layer; enforce model allowlisting. 3. SUPPLY CHAIN: Implement cryptographic signing and hash verification of all TFLite models before deployment — especially in OTA/federated scenarios. 4. DETECTION: Audit TFLite version across all inference infrastructure; monitor inference processes for anomalous heap errors (SIGSEGV, SIGABRT) that may indicate exploitation attempts. 5. ARCHITECTURE: Prefer XNNPACK or GPU delegates over the reference kernel resolver in production to avoid the vulnerable code path.
What systems are affected by CVE-2022-41894?
This vulnerability affects the following AI/ML architecture patterns: edge AI inference, model serving, mobile ML deployments, training pipelines.
What is the CVSS score for CVE-2022-41894?
CVE-2022-41894 has a CVSS v3.1 base score of 8.1 (HIGH). The EPSS exploitation probability is 0.52%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001 AI Software AML.T0011.000 Unsafe AI Artifacts AML.T0049 Exploit Public-Facing Application Compliance Controls Affected
What are the technical details?
Original Advisory
TensorFlow is an open source platform for machine learning. The reference kernel of the `CONV_3D_TRANSPOSE` TensorFlow Lite operator wrongly increments the data_ptr when adding the bias to the result. Instead of `data_ptr += num_channels;` it should be `data_ptr += output_num_channels;` as if the number of input channels is different than the number of output channels, the wrong result will be returned and a buffer overflow will occur if num_channels > output_num_channels. An attacker can craft a model with a specific number of input channels. It is then possible to write specific values through the bias of the layer outside the bounds of the buffer. This attack only works if the reference kernel resolver is used in the interpreter. We have patched the issue in GitHub commit 72c0bdcb25305b0b36842d746cc61d72658d2941. 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.
Exploitation Scenario
An adversary targeting an organization's edge AI inference pipeline (e.g., smart camera fleet, federated learning node) crafts a TFLite model where a CONV_3D_TRANSPOSE layer has num_input_channels significantly greater than num_output_channels. The model is delivered via a compromised model update server or malicious model upload to a training/serving platform. When the TFLite runtime loads and executes the model with the reference kernel resolver active, the bias loop overwrites heap memory beyond the output buffer. Since bias values are attacker-controlled, this enables targeted corruption of adjacent heap structures — function pointers, vtables — potentially yielding code execution on edge devices where patching cadence is slow.
Weaknesses (CWE)
CWE-120 — Buffer Copy without Checking Size of Input ('Classic Buffer Overflow'): The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer.
- [Requirements] Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, many languages that perform their own memory management, such as Java and Perl, are not subject to buffer overflows. Other languages, such as Ada and C#, typically provide overflow protection, but the protection can be disabled by the programmer. Be wary that a language's interface to native code may still be subject to overflows, even if the language itself is theoretically safe.
- [Architecture and Design] Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. Examples include the Safe C String Library (SafeStr) by Messier and Viega [REF-57], and the Strsafe.h library from Microsoft [REF-56]. These libraries provide safer versions of overflow-prone string-handling functions.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H References
- github.com/tensorflow/tensorflow/blob/091e63f0ea33def7ecad661a5ac01dcafbafa90b/tensorflow/lite/kernels/internal/reference/conv3d_transpose.h 3rd Party
- github.com/tensorflow/tensorflow/commit/72c0bdcb25305b0b36842d746cc61d72658d2941 Patch 3rd Party
- github.com/tensorflow/tensorflow/security/advisories/GHSA-h6q3-vv32-2cq5 Exploit Patch 3rd Party
Timeline
Related Vulnerabilities
CVE-2020-15196 9.9 TensorFlow: heap OOB read in sparse/ragged count ops
Same package: tensorflow CVE-2020-15205 9.8 TensorFlow: heap overflow in StringNGrams, ASLR bypass
Same package: tensorflow CVE-2020-15208 9.8 TFLite: OOB read/write via tensor dimension mismatch
Same package: tensorflow CVE-2019-16778 9.8 TensorFlow: heap overflow in UnsortedSegmentSum op
Same package: tensorflow CVE-2022-23587 9.8 TensorFlow: integer overflow in Grappler enables RCE
Same package: tensorflow