Security Advisory

CVE-2022-23559: TFLite Embedding Lookup Overflow

Last updated:
  • CVE-2022-23559

CVE-2022-23559 is an integer overflow (CWE-190) in TensorFlow Lite's embedding lookup: a crafted .tflite model makes size calculations wrap, which in certain scenarios leads to a heap out-of-bounds read or write in the inference runtime. NVD scores it 8.8. Update or rebuild the runtime from TensorFlow 2.5.3, 2.6.3, 2.7.1 or 2.8.0 and later.

Vulnerability summary

CVSS base score

8.8

High severity

EPSS score (FIRST)

1.2%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

Vulnerability ID: CVE-2022-23559 · Source: NVD

Affected components

ComponentCPEVersion range
TensorFlow (including TensorFlow Lite runtime)cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*up to 2.5.2, 2.6.0 to 2.6.2, and 2.7.0 (NVD); fixed in 2.5.3, 2.6.3, 2.7.1 and 2.8.0 (TensorFlow GHSA-98p5-x8x4-c9m5)
tensorflow-cpu and tensorflow-gpu pip packagespkg:pypi/tensorflow-cpubelow 2.5.3, 2.6.0 to 2.6.2, and 2.7.0; fixed in 2.5.3, 2.6.3 and 2.7.1 (GitHub Advisory Database GHSA-98p5-x8x4-c9m5)

What does this mean for affected devices?

TensorFlow's advisory GHSA-98p5-x8x4-c9m5, "Integer overflow in TFLite", published on 2022-02-02, says an attacker "can craft a TFLite model that would cause an integer overflow in embedding lookup operations." In the sparse embedding lookup kernel, embedding_size and lookup_size are products of tensor dimensions taken from the model, so "a malicious user could trigger overflows in the multiplication. In certain scenarios, this can then result in heap OOB read/write." NVD's Primary score is CVSS v3.1 8.8, CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H, with CWE-190 (integer overflow or wraparound). GitHub, the CNA, gives the same 8.8 vector and CWE-190; NVD's CVSS v2 score is 6.5. The record was published on 2022-02-04 (NVD, CVE record). The report came from Wang Xuan of the Qihoo 360 AIVul Team.

Why does this matter on embedded devices?

TensorFlow Lite is the runtime that executes .tflite models on phones, gateways, cameras and other edge hardware, and it parses the model file itself. TensorFlow's security policy states that models "are expressed as programs that TensorFlow executes" and that "using untrusted models or graphs is equivalent to running untrusted code", and it tells users to run untrusted models in a sandbox. On a device that downloads or accepts model updates, a crafted model is an input that can corrupt the heap of the inference process. The fix code adds overflow checks in tensorflow/lite/kernels/embedding_lookup_sparse.cc and a shared MultiplyAndCheckOverflow helper in tensorflow/lite/util.cc.

Which TensorFlow versions are affected?

The GitHub advisory lists the tensorflow, tensorflow-cpu and tensorflow-gpu pip packages below 2.5.3, 2.6.0 to 2.6.2, and 2.7.0. NVD's CPE configuration matches: up to 2.5.2, 2.6.0 to 2.6.2, and 2.7.0. The fix is in TensorFlow 2.8.0 and was cherry-picked into 2.7.1, 2.6.3 and 2.5.3. A TFLite library compiled from TensorFlow source carries the bug if it was built from an affected tag, so check the source version recorded in the firmware SBOM, not only Python packages.

Build systems that package the runtime start above the affected range: Buildroot added its tensorflow-lite package on 2025-01-28 at version 2.11.0 (Buildroot package), and the Debian security tracker marks Debian's tensorflow package not affected because the fix landed before its first upload. No device vendor or CERT advisory naming a product for this CVE was found as of 2026-11-19.

How do you fix CVE-2022-23559?

Rebuild or update the runtime from TensorFlow 2.5.3, 2.6.3, 2.7.1, 2.8.0 or later, and ship the updated library in the firmware image. Only load models from a trusted, signed source, and isolate inference from the rest of the device as the TensorFlow policy recommends. Our AI-BOM guide for embedded AI devices shows how to record the runtime and model versions so a scanner can match them, and the OWASP Machine Learning Security Top 10 guide puts model-file parsing in context. The same bug class shows up in other parsers that ship in firmware, for example the Expat overflow CVE-2024-45491 and the U-Boot allocator overflows in CVE-2024-57258.

Is CVE-2022-23559 exploited?

It is not in the CISA KEV catalog as of 2026-11-19 (catalog version 2026.11.18, 1,786 entries). CISA's SSVC entry records exploitation as "poc" and technical impact as "total". FIRST EPSS gives it 0.01183, the 68.4th percentile, in the 2026-11-18 dataset (CISA KEV, FIRST EPSS).

How to fix this class of issueThis advisory's weakness class is Memory corruption. Our practical guide covers how to detect, fix, verify and disclose it: How to fix memory corruption in embedded firmware.

Evidence

  • NVD: crafted TFLite model causes integer overflow in embedding lookup; embedding_size and lookup_size are products of user-provided values; heap OOB read/write in certain scenarios; NVD Primary CVSS v3.1 8.8 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H, CVSS v2 6.5; CWE-190; CPE tensorflow up to 2.5.2, 2.6.0-2.6.2, 2.7.0; published 2022-02-04. — NVD
  • CVE.org: state PUBLISHED, CNA GitHub (GitHub_M), CVSS 3.1 8.8 same vector, CWE-190; affected < 2.5.3, >= 2.6.0 < 2.6.3, >= 2.7.0 < 2.7.1. — CVE.org
  • TensorFlow GHSA-98p5-x8x4-c9m5 'Integer overflow in TFLite' (2022-02-02): patched in commits f19be71, 1de4972, a4e401d; fix in 2.8.0, cherry-picked to 2.7.1, 2.6.3, 2.5.3; reported by Wang Xuan of Qihoo 360 AIVul Team. — TensorFlow (GitHub)
  • TensorFlow SECURITY.md: models are programs TensorFlow executes; using untrusted models or graphs is equivalent to running untrusted code; run untrusted models in a sandbox. — TensorFlow security policy
  • Buildroot package tensorflow-lite added 2025-01-28, TENSORFLOW_LITE_VERSION 2.11.0, described as inference engine to run trained models. — Buildroot
  • Debian: tensorflow not affected, fixed before initial upload to the archive; forky/sid 2.14.1+dfsg-3.1. — Debian security tracker
  • Not in CISA KEV catalog version 2026.11.18; EPSS 0.01183, percentile 0.68387, dataset 2026-11-18. — CISA KEV / FIRST EPSS

Related advisories

Sources

  1. NVD
  2. TensorFlow security advisory GHSA-98p5-x8x4-c9m5: Integer overflow in TFLite
  3. TensorFlow security policy (SECURITY.md)
  4. TensorFlow fix commit 1de4972: check for overflow when creating required bytes
  5. Buildroot tensorflow-lite package
  6. Debian security tracker: CVE-2022-23559
  7. CVE.org record CVE-2022-23559 (CNA: GitHub)
  8. CISA KEV
  9. FIRST EPSS

Frequently asked questions

Which TensorFlow versions fix CVE-2022-23559?

TensorFlow 2.5.3, 2.6.3, 2.7.1 and 2.8.0 or later. Affected are versions below 2.5.3, 2.6.0 to 2.6.2, and 2.7.0 (per TensorFlow advisory GHSA-98p5-x8x4-c9m5 and NVD).

How is CVE-2022-23559 triggered?

By loading a crafted .tflite model whose tensor dimensions make the products embedding_size and lookup_size overflow in the sparse embedding lookup kernel; in certain scenarios this leads to a heap out-of-bounds read or write (per TensorFlow advisory GHSA-98p5-x8x4-c9m5).

How do I protect an edge device that runs TensorFlow Lite models?

Ship a runtime built from a fixed TensorFlow release, load models only from a trusted source, and run inference on untrusted models in a sandbox, because TensorFlow treats running an untrusted model as running untrusted code (per the TensorFlow security policy).

Is CVE-2022-23559 exploited in the wild?

It is not in the CISA KEV catalog as of 2026-11-19 (catalog version 2026.11.18). FIRST EPSS gives it 0.01183, the 68.4th percentile, in the 2026-11-18 dataset (per CISA KEV and FIRST EPSS).