{"id":"CVE-2022-35937","published":"2022-09-16T19:40:20Z","modified":"2025-04-23T17:04:16Z","title":"OOB read in `Gather_nd` op in TensorFlow Lite","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"TensorFlow is an open source platform for machine learning. The `GatherNd` function takes arguments that determine the sizes of inputs and outputs. If the inputs given are greater than or equal to the sizes of the outputs, an out-of-bounds memory read is triggered. This issue has been patched in GitHub commit 595a65a3e224a0362d7e68c2213acfc2b499a196. The fix will be included in TensorFlow 2.10.0. We will also cherrypick this commit on TensorFlow 2.9.1, TensorFlow 2.8.1, and TensorFlow 2.7.2, as these are also affected and still in supported range. There are no known workarounds for this issue.","provenance":"source","from":"CVE.org"},"cvss":{"score":7,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00578,"percentile":0.48533,"provenance":"source"},"cwes":[{"id":"CWE-125","name":"Out-of-bounds Read"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-pxrw-j2fv-hx3h","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/595a65a3e224a0362d7e68c2213acfc2b499a196","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/blob/f463040eb3997e42e60a2ffc6dc72de7ef11dbb4/tensorflow/lite/kernels/gather_nd.cc#L105-L111","tags":["x_refsource_MISC"]}],"priority":{"score":14.6,"factors":[{"name":"EPSS percentile","points":9.71},{"name":"CVSS severity","points":4.9}]},"vendorSlug":"tensorflow","affectedVersions":[{"vendor":"tensorflow","product":"tensorflow","versions":["< 2.7.2",">= 2.8.0, < 2.8.1",">= 2.9.0, < 2.9.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-23T14:00:09.350683Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"tensorflow","vulnerableRanges":["<2.7.2",">=2.8.0, <2.8.1",">=2.9.0, <2.9.1"],"patched":["2.7.2","2.8.1","2.9.1"],"from":["GHSA-pxrw-j2fv-hx3h","PYSEC-2026-3226"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-cpu","vulnerableRanges":["<2.7.2",">=2.8.0, <2.8.1",">=2.9.0, <2.9.1"],"patched":["2.7.2","2.8.1","2.9.1"],"from":["GHSA-pxrw-j2fv-hx3h","PYSEC-2026-3359"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-gpu","vulnerableRanges":["<2.7.2",">=2.8.0, <2.8.1",">=2.9.0, <2.9.1"],"patched":["2.7.2","2.8.1","2.9.1"],"from":["GHSA-pxrw-j2fv-hx3h","PYSEC-2026-1027"],"provenance":"source"}],"summary":{"text":"An out-of-bounds read flaw exists in the GatherNd operation of TensorFlow (TensorFlow Lite), where input sizes greater than or equal to output sizes cause memory outside the intended buffer to be read. An attacker with network access and no authentication or user interaction can trigger this read, with a high attack complexity required to exploit it.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:35:40Z"},"euvd":{"id":"EUVD-2022-6903","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2021-29589","parents":[{"from":"CVE-2021-29589","to":"CVE-2022-35937","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/lite/kernels/gather_nd.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/8e45822aa0b9f5df4b4c64f221e64dc930a70a9d","https://github.com/tensorflow/tensorflow/commit/595a65a3e224a0362d7e68c2213acfc2b499a196"],"basis":"rarely changed file"}]},{"from":"CVE-2021-37687","to":"CVE-2022-35937","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/lite/kernels/gather_nd.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/bb6a0383ed553c286f87ca88c207f6774d5c4a8f","https://github.com/tensorflow/tensorflow/commit/eb921122119a6b6e470ee98b89e65d721663179d","https://github.com/tensorflow/tensorflow/commit/595a65a3e224a0362d7e68c2213acfc2b499a196"],"basis":"rarely changed file"}]}],"children":[{"from":"CVE-2022-35937","to":"CVE-2022-35939","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/lite/kernels/internal/reference/reference_ops.h"],"commits":["https://github.com/tensorflow/tensorflow/commit/595a65a3e224a0362d7e68c2213acfc2b499a196","https://github.com/tensorflow/tensorflow/commit/b4d4b4cb019bd7240a52daa4ba61e3cc814f0384"],"basis":"rarely changed file"}]}]}}