{"id":"CVE-2022-23559","aliases":["CVE-2022-23559","GHSA-98p5-x8x4-c9m5","BIT-TENSORFLOW-2022-23559","PYSEC-2022-123","PYSEC-2022-68","PYSEC-2026-3146"],"related":[],"kind":"vulnerability","state":"published","title":"Integer overflow in TFLite","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact \nAn attacker can craft a TFLite model that would cause an integer overflow [in embedding lookup operations](https://github.com/tensorflow/tensorflow/blob/ca6f96b62ad84207fbec580404eaa7dd7403a550/tensorflow/lite/kernels/embedding_lookup_sparse.cc#L179-L189):\n\n```cc\n  int embedding_size = 1;\n  int lookup_size = 1;\n  for (int i = 0; i < lookup_rank - 1; i++, k++) {\n    const int dim = dense_shape->data.i32[i];\n    lookup_size *= dim;\n    output_shape->data[k] = dim;\n  }\n  for (int i = 1; i < embedding_rank; i++, k++) {\n    const int dim = SizeOfDimension(value, i);\n    embedding_size *= dim;\n    output_shape->data[k] = dim;\n  } \n```\n\nBoth `embedding_size` and `lookup_size` are products of values provided by the user. Hence, a malicious user could trigger overflows in the multiplication.\n\nIn certain scenarios, this can then result in heap OOB read/write.\n  \n### Patches\nWe have patched the issue in GitHub commits [f19be71717c497723ba0cea0379e84f061a75e01](https://github.com/tensorflow/tensorflow/commit/f19be71717c497723ba0cea0379e84f061a75e01), [1de49725a5fc4e48f1a3b902ec3599ee99283043](https://github.com/tensorflow/tensorflow/commit/1de49725a5fc4e48f1a3b902ec3599ee99283043) and [a4e401da71458d253b05e41f28637b65baf64be4](https://github.com/tensorflow/tensorflow/commit/a4e401da71458d253b05e41f28637b65baf64be4).\n\nThe 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.\n\n### For more information\nPlease consult [our security guide](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md) for more information regarding the security model and how to contact us with issues and questions.\n\n### Attribution\nThis vulnerability has been reported by Wang Xuan of Qihoo 360 AIVul Team.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Tensorflow es un Marco de Aprendizaje Automático de Código Abierto. Un atacante puede diseñar un modelo TFLite que cause un desbordamiento de enteros en las operaciones de búsqueda de inserción. Tanto \"embedding_size\" como \"lookup_size\" son productos de valores proporcionados por el usuario. Por lo tanto, un usuario malicioso podría desencadenar desbordamientos en la multiplicación. En determinados escenarios, esto puede resultar en una lectura/escritura de OOB de la pila. Se aconseja a usuarios que actualicen a una versión parcheada","source":"nvd"}],"published":"2022-02-04T22:32:37.000Z","modified":"2026-09-08T08:48:25.248Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:S/C:P/I:P/A:P","score":6.5,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-190"],"affected":[{"ranges":[{"version":">= 2.7.0, < 2.7.1","status":"affected"},{"version":">= 2.6.0, < 2.6.3","status":"affected"},{"version":"< 2.5.3","status":"affected"}],"vendor":"tensorflow","product":"tensorflow","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.5.3"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.6.0","status":"affected","fixed":"2.6.3"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.7.0","status":"affected","fixed":"2.7.1"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.5.3"}],"ecosystem":"PyPI","package":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.6.0","status":"affected","fixed":"2.6.3"}],"ecosystem":"PyPI","package":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.7.0","status":"affected","fixed":"2.7.1"}],"ecosystem":"PyPI","package":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.5.3"}],"ecosystem":"PyPI","package":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.6.0","status":"affected","fixed":"2.6.3"}],"ecosystem":"PyPI","package":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.7.0","status":"affected","fixed":"2.7.1"}],"ecosystem":"PyPI","package":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"2.5.2"},{"status":"affected","introduced":"2.6.0","lastAffected":"2.6.2"},{"status":"affected","version":"2.7.0"}],"vendor":"google","product":"tensorflow","cpe":"cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"a4e401da71458d253b05e41f28637b65baf64be4"},{"type":"git","status":"affected","fixed":"1de49725a5fc4e48f1a3b902ec3599ee99283043"},{"type":"git","status":"affected","fixed":"f19be71717c497723ba0cea0379e84f061a75e01"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.5.3"},{"type":"ecosystem","introduced":"2.6.0","status":"affected","fixed":"2.6.3"}],"ecosystem":"PyPI","package":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","repo":"https://github.com/tensorflow/tensorflow","source":"pysec"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"a4e401da71458d253b05e41f28637b65baf64be4"},{"type":"git","status":"affected","fixed":"1de49725a5fc4e48f1a3b902ec3599ee99283043"},{"type":"git","status":"affected","fixed":"f19be71717c497723ba0cea0379e84f061a75e01"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.5.3"},{"type":"ecosystem","introduced":"2.6.0","status":"affected","fixed":"2.6.3"}],"ecosystem":"PyPI","package":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","repo":"https://github.com/tensorflow/tensorflow","source":"pysec"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.5.3"},{"type":"ecosystem","introduced":"2.6.0","status":"affected","fixed":"2.6.3"},{"type":"ecosystem","introduced":"2.7.0","status":"affected","fixed":"2.7.1"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","source":"pysec"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.5.3"},{"type":"semver","introduced":"2.6.0","status":"affected","fixed":"2.6.3"},{"type":"semver","introduced":"2.7.0","status":"affected","fixed":"2.7.1"}],"ecosystem":"Bitnami","package":"tensorflow","purl":"pkg:bitnami/tensorflow","source":"bitnami"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-98p5-x8x4-c9m5","tags":["advisory","patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow/commit/1de49725a5fc4e48f1a3b902ec3599ee99283043","tags":["advisory","fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow/commit/a4e401da71458d253b05e41f28637b65baf64be4","tags":["advisory","fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow/commit/f19be71717c497723ba0cea0379e84f061a75e01","tags":["advisory","fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow/blob/ca6f96b62ad84207fbec580404eaa7dd7403a550/tensorflow/lite/kernels/embedding_lookup_sparse.cc#L179-L189","tags":["advisory","exploit","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23559","tags":["advisory","web"],"sources":["ghsa","pysec","bitnami"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2022-68.yaml","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2022-123.yaml","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/tensorflow/tensorflow","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/tensorflow","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-98p5-x8x4-c9m5","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2025-04-22T15:44:41.212Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-23559","url":"https://www.cve.org/CVERecord?id=CVE-2022-23559","licence":"CVE Terms of Use","modified":"2025-04-22T18:23:20.273Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-98p5-x8x4-c9m5","url":"https://github.com/advisories/GHSA-98p5-x8x4-c9m5","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:02.718Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-23559","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23559","licence":"Public domain","modified":"2026-06-17T04:30:21.370Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2022-123","url":"https://osv.dev/vulnerability/PYSEC-2022-123","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:02.718Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2022-68","url":"https://osv.dev/vulnerability/PYSEC-2022-68","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:02.718Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-3146","url":"https://osv.dev/vulnerability/PYSEC-2026-3146","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:02.718Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-TENSORFLOW-2022-23559","url":"https://osv.dev/vulnerability/BIT-TENSORFLOW-2022-23559","licence":"Apache-2.0","modified":"2026-09-08T08:48:25.248Z"}],"updatedAt":"2026-11-25T22:58:09.506Z","epss":{"score":0.01119,"percentile":0.65868,"date":"2026-11-30T12:00:22.000Z"}}