{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2021-41220","id":"CVE-2021-41220","title":"Use after free in `CollectiveReduceV2`","description":"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 TensorF","descriptionLong":"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.","published":"2021-11-05T22:20:12.000Z","updated":"2026-10-20T14:28:22.738453999Z","reserved":"2021-09-15T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub_M"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"github.com"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub"},{"version":"2.0","score":4.6,"vector":"AV:L/AC:L/Au:N/C:P/I:P/A:P","rating":"medium","source":"NVD"}],"rating":"high","products":["tensorflow"],"affectedProducts":[{"vendor":"tensorflow","product":"tensorflow","defaultStatus":null,"versions":[{"status":"affected","version":">= 2.6.0, < 2.6.1"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"tensorflow","purl":"pkg:pypi/tensorflow","ranges":[">=2.6.0 <2.6.1",">=2.7.0rc0 <2.7.0"],"fixed":["2.6.1","2.7.0"],"advisory":"GHSA-gpfh-jvf9-7wg5"},{"ecosystem":"PyPI","name":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","ranges":[">=2.6.0 <2.6.1",">=2.7.0rc0 <2.7.0"],"fixed":["2.6.1","2.7.0"],"advisory":"GHSA-gpfh-jvf9-7wg5"},{"ecosystem":"PyPI","name":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","ranges":[">=2.6.0 <2.6.1",">=2.7.0rc0 <2.7.0"],"fixed":["2.6.1","2.7.0"],"advisory":"GHSA-gpfh-jvf9-7wg5"}],"cwes":["CWE-416"],"aliases":["BIT-tensorflow-2021-41220","GHSA-gpfh-jvf9-7wg5","PYSEC-2021-412","PYSEC-2021-629","PYSEC-2021-827"],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-gpfh-jvf9-7wg5","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Patch","Third Party Advisory","fix","web","advisory"]},{"url":"https://github.com/tensorflow/tensorflow/commit/ca38dab9d3ee66c5de06f11af9a4b1200da5ef75","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-41220","tags":["advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2021-629.yaml","tags":["web"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2021-827.yaml","tags":["web"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2021-412.yaml","tags":["web"]},{"url":"https://github.com/tensorflow/tensorflow","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.00211,"epssPercentile":0.11419,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2021-41220","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-41220","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2021-41220","ok":true,"note":"3 packages"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-gpfh-jvf9-7wg5","ok":true,"note":"GHSA-gpfh-jvf9-7wg5"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-41220","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}