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.
Risk Assessment
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.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| tensorflow | pip | — | No patch |
Do you use tensorflow? You're affected.
Severity & Risk
Attack Surface
Recommended Action
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.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
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.21%.
Technical Details
NVD Description
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)
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
AI Threat Alert