CVE-2022-23559: TFLite: integer overflow in embedding lookup → heap OOB RW

HIGH PoC AVAILABLE CISA: ATTEND
Published February 4, 2022
CISO Take

Any service that accepts user-submitted TFLite model files is exposed to heap out-of-bounds read/write, which can lead to remote code execution with only low-privilege access and no user interaction required. If your organisation runs TFLite inference endpoints or pipelines that ingest externally supplied models, patch immediately and enforce strict model provenance controls. CVSS 8.8 with network vector and low complexity makes this trivially weaponisable by any authenticated API user.

What is the risk?

High severity (CVSS 8.8). The attack requires only low privileges and zero user interaction, eliminating most practical barriers to exploitation. The integer overflow in embedding_size × lookup_size produces a heap OOB R/W primitive—a reliable stepping stone to RCE on the host running inference. Exposure is highest in multi-tenant model-serving platforms, ML-as-a-Service offerings, and CI/CD pipelines that automatically evaluate community-contributed models. Not in CISA KEV as of analysis date, but the low exploitation complexity warrants treatment as actively exploitable.

What systems are affected?

Package Ecosystem Vulnerable Range Patched
TensorFlow pip No patch
195.8K OpenSSF 7.1 3.7K dependents Pushed 3d ago 4% patched ~1372d to patch Full package profile →

Do you use TensorFlow? You're affected.

How severe is it?

CVSS 3.1
8.8 / 10
EPSS
1.2%
chance of exploitation in 30 days
Higher than 63% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Moderate
Exploitation Confidence
medium
CISA SSVC: Public PoC
Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the attack surface?

AV AC PR UI S C I A
AV Network
AC Low
PR Low
UI None
S Unchanged
C High
I High
A High

What should I do?

5 steps
  1. PATCH

    Upgrade TensorFlow to a version containing commits 1de4972, a4e401d, and f19be71 (released post-2022-02-04). Verify via pip show tensorflow and cross-check against TF security advisories.

  2. VALIDATE INPUTS

    Before passing a TFLite model to the interpreter, validate that embedding_size and lookup_size values are within safe bounds and their product does not overflow int32/int64.

  3. MODEL PROVENANCE

    Reject TFLite models from untrusted sources; enforce cryptographic signing of model artifacts in your ML pipeline.

  4. SANDBOX INFERENCE

    Run TFLite inference in isolated processes or containers with minimal filesystem and network permissions; use seccomp/AppArmor profiles.

  5. DETECT

    Monitor inference workers for anomalous memory access patterns (ASAN in staging, heap-hardening allocators in production). Alert on unexpected crashes or segfaults in TFLite interpreter processes.

What does CISA's SSVC say?

Decision Attend
Exploitation poc
Automatable No
Technical Impact total

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:

EU AI Act
Article 15 - Accuracy, robustness and cybersecurity Article 9 - Risk management system
ISO 42001
A.9.3 - AI system security
NIST AI RMF
MANAGE-2.2 - Risk treatments applied to deployed AI systems
OWASP LLM Top 10
LLM05:2025 - Supply Chain Vulnerabilities

Frequently Asked Questions

What is CVE-2022-23559?

Any service that accepts user-submitted TFLite model files is exposed to heap out-of-bounds read/write, which can lead to remote code execution with only low-privilege access and no user interaction required. If your organisation runs TFLite inference endpoints or pipelines that ingest externally supplied models, patch immediately and enforce strict model provenance controls. CVSS 8.8 with network vector and low complexity makes this trivially weaponisable by any authenticated API user.

Is CVE-2022-23559 actively exploited?

Proof-of-concept exploit code is publicly available for CVE-2022-23559, increasing the risk of exploitation.

How to fix CVE-2022-23559?

1. PATCH: Upgrade TensorFlow to a version containing commits 1de4972, a4e401d, and f19be71 (released post-2022-02-04). Verify via `pip show tensorflow` and cross-check against TF security advisories. 2. VALIDATE INPUTS: Before passing a TFLite model to the interpreter, validate that embedding_size and lookup_size values are within safe bounds and their product does not overflow int32/int64. 3. MODEL PROVENANCE: Reject TFLite models from untrusted sources; enforce cryptographic signing of model artifacts in your ML pipeline. 4. SANDBOX INFERENCE: Run TFLite inference in isolated processes or containers with minimal filesystem and network permissions; use seccomp/AppArmor profiles. 5. DETECT: Monitor inference workers for anomalous memory access patterns (ASAN in staging, heap-hardening allocators in production). Alert on unexpected crashes or segfaults in TFLite interpreter processes.

What systems are affected by CVE-2022-23559?

This vulnerability affects the following AI/ML architecture patterns: TFLite edge inference, model serving, training pipelines, recommendation system inference, on-device ML (mobile/embedded).

What is the CVSS score for CVE-2022-23559?

CVE-2022-23559 has a CVSS v3.1 base score of 8.8 (HIGH). The EPSS exploitation probability is 1.16%.

What is the AI security impact?

Affected AI Architectures

TFLite edge inferencemodel servingtraining pipelinesrecommendation system inferenceon-device ML (mobile/embedded)

MITRE ATLAS Techniques

AML.T0010.001 AI Software
AML.T0011.000 Unsafe AI Artifacts
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Article 15, Article 9
ISO 42001: A.9.3
NIST AI RMF: MANAGE-2.2
OWASP LLM Top 10: LLM05:2025

What are the technical details?

Original Advisory

Tensorflow is an Open Source Machine Learning Framework. An attacker can craft a TFLite model that would cause an integer overflow in embedding lookup operations. Both `embedding_size` and `lookup_size` are products of values provided by the user. Hence, a malicious user could trigger overflows in the multiplication. In certain scenarios, this can then result in heap OOB read/write. Users are advised to upgrade to a patched version.

Exploitation Scenario

An adversary with low-privilege access to an internal ML model evaluation service uploads a crafted TFLite model. The model contains a sparse embedding layer with manipulated metadata: embedding_size and lookup_size are chosen such that their product overflows a 32-bit integer, yielding a small allocation. Subsequent kernel operations write attacker-controlled data beyond the allocation boundary. With a suitable heap layout (achievable through multiple requests), the adversary overwrites adjacent allocator metadata or function pointers, redirecting execution to a shellcode stub or ROP chain. The inference worker process is compromised, granting access to model weights, inference request data, and potentially the host if container hardening is absent.

Weaknesses (CWE)

CWE-190 — Integer Overflow or Wraparound: The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.

  • [Requirements] Ensure that all protocols are strictly defined, such that all out-of-bounds behavior can be identified simply, and require strict conformance to the protocol.
  • [Requirements] Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. If possible, choose a language or compiler that performs automatic bounds checking.

Source: MITRE CWE corpus.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Timeline

Published
February 4, 2022
Last Modified
November 21, 2024
First Seen
February 4, 2022

Related Vulnerabilities