{"id":"CVE-2021-41220","published":"2021-11-05T22:20:12Z","modified":"2024-08-04T03:08:31Z","title":"Use after free in `CollectiveReduceV2`","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"TensorFlow is an open source platform for machine learning. In affected versions the async implementation of `CollectiveReduceV2` suffers from a memory leak and a use after free. This occurs due to the asynchronous computation and the fact that objects that have been `std::move()`d from are still accessed. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, as this version is the only one that is also affected.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00211,"percentile":0.11517,"provenance":"source"},"cwes":[{"id":"CWE-416","name":"Use After Free"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-gpfh-jvf9-7wg5","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/ca38dab9d3ee66c5de06f11af9a4b1200da5ef75","tags":["x_refsource_MISC"]}],"priority":{"score":7.8,"factors":[{"name":"EPSS percentile","points":2.3},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"tensorflow","affectedVersions":[{"vendor":"tensorflow","product":"tensorflow","versions":[">= 2.6.0, < 2.6.1"]}],"affected":[{"ecosystem":"PyPI","package":"tensorflow","vulnerableRanges":[">=2.6.0, <2.6.1",">=2.7.0rc0, <2.7.0"],"patched":["2.6.1","2.7.0"],"from":["GHSA-gpfh-jvf9-7wg5","PYSEC-2021-412"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-cpu","vulnerableRanges":[">=2.6.0, <2.6.1",">=2.7.0rc0, <2.7.0"],"patched":["2.6.1","2.7.0"],"from":["GHSA-gpfh-jvf9-7wg5","PYSEC-2021-629"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-gpu","vulnerableRanges":[">=2.6.0, <2.6.1",">=2.7.0rc0, <2.7.0"],"patched":["2.6.1","2.7.0"],"from":["GHSA-gpfh-jvf9-7wg5","PYSEC-2021-827"],"provenance":"source"}],"summary":{"text":"A use-after-free and memory leak exist in the asynchronous implementation of the CollectiveReduceV2 operation in TensorFlow, caused by accessing objects that were already moved from via std::move(). An attacker with local access and low privileges, and no required user interaction, can trigger the flaw during asynchronous collective reduce computation.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:11:19Z"},"euvd":{"id":"EUVD-2021-0442","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2021-41220","children":[{"from":"CVE-2021-41220","to":"CVE-2022-35994","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/collective_ops.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/ca38dab9d3ee66c5de06f11af9a4b1200da5ef75","https://github.com/tensorflow/tensorflow/commit/c1f491817dec39a26be3c574e86a88c30f3c4770"],"basis":"rarely changed file"}]}]}}