Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-41220

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-41220
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 12:52 UTC · Revision 1

Source evidence

CVE-2021-41220

core-osv · Original source

Published 5 Nov 2021, 23:15 UTC

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.

osv:CVE-2021-41220
Complete source record
{
  "id": "07e2306b89d066698bc3d8d8bef3145f18481fd94d404bd5d65ab47ba3e2e114",
  "url": "https://osv.dev/vulnerability/CVE-2021-41220",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-41220",
    "summary": "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.",
    "evidence": "osv:CVE-2021-41220",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2021-41220",
      "aliases": [
        "BIT-tensorflow-2021-41220",
        "CVE-2021-41220",
        "GHSA-gpfh-jvf9-7wg5",
        "PYSEC-2021-412",
        "PYSEC-2021-629",
        "PYSEC-2021-827"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/tensorflow/tensorflow",
              "type": "GIT",
              "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"
                  },
                  {
                    "cpe": "cpe:2.3:a:google:tensorflow:2.7.0:rc1:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.7.0-rc1"
                      },
                      {
                        "last_affected": "2.7.0-rc1"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "range": [
                      {
                        "fixed": "ca38dab9d3ee66c5de06f11af9a4b1200da5ef75"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "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": [
              {
                "id": "CVE-2021-41220-474ae294",
                "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"
                  ]
                },
                "source": "https://github.com/tensorflow/tensorflow/commit/ca38dab9d3ee66c5de06f11af9a4b1200da5ef75",
                "target": {
                  "file": "tensorflow/core/kernels/collective_ops.cc"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T14:28:22Z"
          }
        }
      ],
      "modified": "2026-10-20T14:28:22.738453999Z",
      "provider": "osv",
      "references": [
        "https://github.com/tensorflow/tensorflow/commit/ca38dab9d3ee66c5de06f11af9a4b1200da5ef75",
        "https://github.com/tensorflow/tensorflow/security/advisories/GHSA-gpfh-jvf9-7wg5"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-41220",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 389051,
  "published_at": "2021-11-05T23:15:08.35+00:00"
}