{"id":"CVE-2021-41220","details":"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.","aliases":["BIT-tensorflow-2021-41220","GHSA-gpfh-jvf9-7wg5","PYSEC-2021-412","PYSEC-2021-629","PYSEC-2021-827"],"modified":"2026-10-20T14:28:22.738453999Z","published":"2021-11-05T23:15:08.350Z","related":["openSUSE-SU-2024:12116-1"],"database_specific":{},"references":[{"type":"FIX","url":"https://github.com/tensorflow/tensorflow/commit/ca38dab9d3ee66c5de06f11af9a4b1200da5ef75"},{"type":"FIX","url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-gpfh-jvf9-7wg5"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/tensorflow/tensorflow","events":[{"introduced":"919f693420e35d00c8d0a42100837ae3718f7927"},{"fixed":"3aa40c3ce9d16eae296f086bc4ac4d62deb2affc"},{"introduced":"ce35e5c3a8efdb8161c6a85c8fb9ffb5bbdc9ffd"},{"last_affected":"ff68385595088304cf772086b9a259a65b007622"},{"fixed":"ca38dab9d3ee66c5de06f11af9a4b1200da5ef75"}],"database_specific":{"extracted_events":[{"cpe":"cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*","range":[{"introduced":"2.6.0"},{"fixed":"2.6.1"}],"source":"CPE_RANGE"},{"cpe":"cpe:2.3:a:google:tensorflow:2.7.0:rc0:*:*:*:*:*:*","range":[{"introduced":"2.7.0-rc0"},{"last_affected":"2.7.0-rc0"}],"source":"CPE_STRING"},{"source":"CPE_STRING","cpe":"cpe:2.3:a:google:tensorflow:2.7.0:rc1:*:*:*:*:*:*","range":[{"introduced":"2.7.0-rc1"},{"last_affected":"2.7.0-rc1"}]},{"source":"REFERENCES_COMMIT","range":[{"fixed":"ca38dab9d3ee66c5de06f11af9a4b1200da5ef75"}]}]}}],"versions":["2.7.0-rc0","2.7.0-rc1","v2.7.0-rc1","v2.6.0","v2.7.0-rc0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-41220.json","vanir_signatures":[{"signature_type":"Line","signature_version":"v1","source":"https://github.com/tensorflow/tensorflow/commit/ca38dab9d3ee66c5de06f11af9a4b1200da5ef75","target":{"file":"tensorflow/core/kernels/collective_ops.cc"},"deprecated":false,"digest":{"threshold":0.9,"line_hashes":["338948356229469020805815079828258369413","168512677154214355762705993117936838747","308298351816408622543529755608639907573","234436765834978682647371661337842765306","48513721119313004761811739154469322916","260202002902824232676084459795803277873","15492984630713532935008376667334996945","107613227606920183042820726727560780570","186495919105110702211587862446273680586","70584548977803028960686872262741841600","260746492816166115556943475513906187291","249597394030345684604032318652338511441","92741684098943124287552158973579031833","171790708788962362248630908367041603931","35191088251143621287243241523216635613","326168654864335212929513896699322967375","325917049915852774819431431024409690320","47177549177859325073609915942482588006","158271035563839733200697006344570856778","150617383422449719926117211090001987853","86971851770655991859752352645569239670","288278018693291380247864232316136034091","25045199023250229894918562257488685402","213665233688514072629873422338900361419","163197330087345089577165711802829253379","296386779089235968969856837863226957413","170900451243732378412301461390613903231","288911683368687492500732696685655587004","129099520943183626931750916681445818184","61178283799210547690338107863518983985","146457035302871562298252074752475177563","288911683368687492500732696685655587004","129099520943183626931750916681445818184","61178283799210547690338107863518983985","146457035302871562298252074752475177563"]},"id":"CVE-2021-41220-474ae294"}],"vanir_signatures_modified":"2026-10-20T14:28:22Z"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}