Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-37671

TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can cause undefined behavior via binding a reference to null pointer in `tf.raw_ops.Map*` and `tf.raw_ops.OrderedMap*` operations. The [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/kernels/map_stage_op.cc#L222-L248) has a check in place to ensure that `indices` is in ascending order, but does not check that `indices` is not empty. We have patched the issue in GitHub commit 532f5c5a547126c634fefd43bbad1dc6417678ac. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.

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

Source evidence

CVE-2021-37671

core-osv · Original source

Published 12 Aug 2021, 22:15 UTC

TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can cause undefined behavior via binding a reference to null pointer in `tf.raw_ops.Map*` and `tf.raw_ops.OrderedMap*` operations. The [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/kernels/map_stage_op.cc#L222-L248) has a check in place to ensure that `indices` is in ascending order, but does not check that `indices` is not empty. We have patched the issue in GitHub commit 532f5c5a547126c634fefd43bbad1dc6417678ac. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.

osv:CVE-2021-37671
Complete source record
{
  "id": "bbcda903c44521a28366c0be6c3fbbfa4d0a72278400a24c223d3bd03987b609",
  "url": "https://osv.dev/vulnerability/CVE-2021-37671",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-37671",
    "summary": "TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can cause undefined behavior via binding a reference to null pointer in `tf.raw_ops.Map*` and `tf.raw_ops.OrderedMap*` operations. The [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/kernels/map_stage_op.cc#L222-L248) has a check in place to ensure that `indices` is in ascending order, but does not check that `indices` is not empty. We have patched the issue in GitHub commit 532f5c5a547126c634fefd43bbad1dc6417678ac. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.",
    "evidence": "osv:CVE-2021-37671",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2021-37671",
      "aliases": [
        "BIT-tensorflow-2021-37671",
        "CVE-2021-37671",
        "GHSA-qr82-2c78-4m8h",
        "PYSEC-2021-293",
        "PYSEC-2021-584",
        "PYSEC-2021-782"
      ],
      "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": "b36436b087bd8e8701ef51718179037cccdfc26e"
                },
                {
                  "fixed": "7462dcaae1e8cfe1dfd0c62dd6083f9749a9d827"
                },
                {
                  "introduced": "582c8d236cb079023657287c318ff26adb239002"
                },
                {
                  "fixed": "4c0b84bf2a714bcdd18da1f1f94d533d72399d52"
                },
                {
                  "introduced": "a4dfb8d1a71385bd6d122e4f27f86dcebb96712d"
                },
                {
                  "last_affected": "5368d50428b30b7c9ccd038aec65d09252d16596"
                },
                {
                  "fixed": "532f5c5a547126c634fefd43bbad1dc6417678ac"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.3.0"
                      },
                      {
                        "fixed": "2.3.4"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.4.0"
                      },
                      {
                        "fixed": "2.4.3"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:google:tensorflow:2.5.0:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.5.0"
                      },
                      {
                        "last_affected": "2.5.0"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "cpe": "cpe:2.3:a:google:tensorflow:2.6.0:rc0:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.6.0-rc0"
                      },
                      {
                        "last_affected": "2.6.0-rc0"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "cpe": "cpe:2.3:a:google:tensorflow:2.6.0:rc1:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.6.0-rc1"
                      },
                      {
                        "last_affected": "2.6.0-rc1"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "cpe": "cpe:2.3:a:google:tensorflow:2.6.0:rc2:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.6.0-rc2"
                      },
                      {
                        "last_affected": "2.6.0-rc2"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "range": [
                      {
                        "fixed": "532f5c5a547126c634fefd43bbad1dc6417678ac"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "2.5.0",
            "2.6.0-rc0",
            "2.6.0-rc1",
            "2.6.0-rc2",
            "v2.3.3",
            "v2.4.2",
            "v2.3.2",
            "v2.4.1",
            "v2.4.0",
            "v2.3.1",
            "v2.3.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-37671.json",
            "vanir_signatures": [
              {
                "id": "CVE-2021-37671-6f9a8b7a",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "101270794011391990960273166363886381699",
                    "127567948000679501096689160476919037159",
                    "283873026211747067522129611499356494408",
                    "199550947259889392532635302582293019756",
                    "101692540017467017766872335871265843648",
                    "325935887256889070731197183047988204613",
                    "185041216772895998777906462325282620652",
                    "251826227174176876517082477910448041335",
                    "202229951261415798519556149708101139418",
                    "324059966233205313228581230177752822721",
                    "209798581753765881305378150538004968962",
                    "97334924217345854418038715912586586563",
                    "11484242756864040319387314600609541995",
                    "320540121400502850523022069923505129763",
                    "48142271025788149745820039806993843858",
                    "15375361714468426007494293680261077320",
                    "52021494098927027454794326476115537243",
                    "57944569019607461775153761753527151447",
                    "157109492641608684762227177061837983847",
                    "86356617569703579789284666717648540443",
                    "320884592715409454363198810760046893823",
                    "289192258019031814832220644887238772370"
                  ]
                },
                "source": "https://github.com/tensorflow/tensorflow/commit/532f5c5a547126c634fefd43bbad1dc6417678ac",
                "target": {
                  "file": "tensorflow/core/kernels/map_stage_op.cc"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T14:28:20Z"
          }
        }
      ],
      "modified": "2026-10-20T14:28:20.789479241Z",
      "provider": "osv",
      "references": [
        "https://github.com/tensorflow/tensorflow/security/advisories/GHSA-qr82-2c78-4m8h",
        "https://github.com/tensorflow/tensorflow/commit/532f5c5a547126c634fefd43bbad1dc6417678ac"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-37671",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 389041,
  "published_at": "2021-08-12T22:15:08.44+00:00"
}