{"id":"CVE-2022-23578","published":"2022-02-04T22:32:30Z","modified":"2025-04-22T18:24:09Z","title":"Memory leak in Tensorflow","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"Tensorflow is an Open Source Machine Learning Framework. If a graph node is invalid, TensorFlow can leak memory in the implementation of `ImmutableExecutorState::Initialize`. Here, we set `item->kernel` to `nullptr` but it is a simple `OpKernel*` pointer so the memory that was previously allocated to it would leak. The 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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00635,"percentile":0.44923,"provenance":"source"},"cwes":[{"id":"CWE-401","name":"Missing Release of Memory after Effective Lifetime"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-8r7c-3cm2-3h8f","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/c79ccba517dbb1a0ccb9b01ee3bd2a63748b60dd","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/blob/a1320ec1eac186da1d03f033109191f715b2b130/tensorflow/core/common_runtime/immutable_executor_state.cc#L84-L262","tags":["x_refsource_MISC"]}],"priority":{"score":12.0,"factors":[{"name":"EPSS percentile","points":8.98},{"name":"CVSS severity","points":3.01}]},"vendorSlug":"tensorflow","affectedVersions":[{"vendor":"tensorflow","product":"tensorflow","versions":[">= 2.7.0, < 2.7.1","< 2.5.3",">= 2.6.0, < 2.6.3"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-22T15:50:06.272509Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"tensorflow","vulnerableRanges":["<2.5.3",">=2.6.0, <2.6.3",">=2.7.0, <2.7.1"],"patched":["2.5.3","2.6.3","2.7.1"],"from":["GHSA-8r7c-3cm2-3h8f","PYSEC-2026-3138"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-cpu","vulnerableRanges":["<2.5.3",">=2.6.0, <2.6.3",">=2.7.0, <2.7.1"],"patched":["2.5.3","2.6.3","2.7.1"],"from":["GHSA-8r7c-3cm2-3h8f","PYSEC-2022-87"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-gpu","vulnerableRanges":["<2.5.3",">=2.6.0, <2.6.3",">=2.7.0, <2.7.1"],"patched":["2.5.3","2.6.3","2.7.1"],"from":["GHSA-8r7c-3cm2-3h8f","PYSEC-2022-142"],"provenance":"source"}],"summary":{"text":"The TensorFlow framework has a memory leak in its ImmutableExecutorState::Initialize implementation, where an invalid graph node causes previously allocated memory for item->kernel to be lost when the pointer is reset to nullptr. An attacker with network access and low privileges (no user interaction required) can trigger the leak through an invalid graph node, resulting in availability degradation on the affected system.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:44:08Z"},"euvd":{"id":"EUVD-2022-0326","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2021-41217","parents":[{"from":"CVE-2021-41217","to":"CVE-2022-23578","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/common_runtime/immutable_executor_state.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/05cbebd3c6bb8f517a158b0155debb8df79017ff","https://github.com/tensorflow/tensorflow/commit/c79ccba517dbb1a0ccb9b01ee3bd2a63748b60dd"],"basis":"rarely changed file"}]}]}}