Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-37665

TensorFlow is an end-to-end open source platform for machine learning. In affected versions due to incomplete validation in MKL implementation of requantization, an attacker can trigger undefined behavior via binding a reference to a null pointer or can access data outside the bounds of heap allocated arrays. The [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/kernels/mkl/mkl_requantization_range_per_channel_op.cc) does not validate the dimensions of the `input` tensor. A similar issue occurs in `MklRequantizePerChannelOp`. The [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/kernels/mkl/mkl_requantize_per_channel_op.cc) does not perform full validation for all the input arguments. We have patched the issue in GitHub commit 9e62869465573cb2d9b5053f1fa02a81fce21d69 and in the Github commit 203214568f5bc237603dbab6e1fd389f1572f5c9. 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-37665
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 12:46 UTC · Revision 1

Source evidence

CVE-2021-37665

core-osv · Original source

Published 12 Aug 2021, 23:15 UTC

TensorFlow is an end-to-end open source platform for machine learning. In affected versions due to incomplete validation in MKL implementation of requantization, an attacker can trigger undefined behavior via binding a reference to a null pointer or can access data outside the bounds of heap allocated arrays. The [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/kernels/mkl/mkl_requantization_range_per_channel_op.cc) does not validate the dimensions of the `input` tensor. A similar issue occurs in `MklRequantizePerChannelOp`. The [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/kernels/mkl/mkl_requantize_per_channel_op.cc) does not perform full validation for all the input arguments. We have patched the issue in GitHub commit 9e62869465573cb2d9b5053f1fa02a81fce21d69 and in the Github commit 203214568f5bc237603dbab6e1fd389f1572f5c9. 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-37665
Complete source record
{
  "id": "f9e8113e6378316affb5f3569362fc47e86eff6a4e93c6913cba5fcd898bf666",
  "url": "https://osv.dev/vulnerability/CVE-2021-37665",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-37665",
    "summary": "TensorFlow is an end-to-end open source platform for machine learning. In affected versions due to incomplete validation in MKL implementation of requantization, an attacker can trigger undefined behavior via binding a reference to a null pointer or can access data outside the bounds of heap allocated arrays. The [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/kernels/mkl/mkl_requantization_range_per_channel_op.cc) does not validate the dimensions of the `input` tensor. A similar issue occurs in `MklRequantizePerChannelOp`. The [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/kernels/mkl/mkl_requantize_per_channel_op.cc) does not perform full validation for all the input arguments. We have patched the issue in GitHub commit 9e62869465573cb2d9b5053f1fa02a81fce21d69 and in the Github commit 203214568f5bc237603dbab6e1fd389f1572f5c9. 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-37665",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2021-37665",
      "aliases": [
        "BIT-tensorflow-2021-37665",
        "CVE-2021-37665",
        "GHSA-v82p-hv3v-p6qp",
        "PYSEC-2021-287",
        "PYSEC-2021-578",
        "PYSEC-2021-776"
      ],
      "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": "203214568f5bc237603dbab6e1fd389f1572f5c9"
                },
                {
                  "fixed": "9e62869465573cb2d9b5053f1fa02a81fce21d69"
                }
              ],
              "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": "203214568f5bc237603dbab6e1fd389f1572f5c9"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "9e62869465573cb2d9b5053f1fa02a81fce21d69"
                      }
                    ],
                    "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-37665.json",
            "vanir_signatures": [
              {
                "id": "CVE-2021-37665-59a51f36",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "214019078671263566713078640073991371266",
                    "213866654866034659853199433192407190806",
                    "71445458365890292503618873769028523393",
                    "122340794278239499586521365744019295518",
                    "112742911286913782391119557374330978179",
                    "56909507702175323316578548285813441960",
                    "336718185738892200596573985028565433129",
                    "229580169215757890619528963278974165948",
                    "160940305528080461225297892730903064789",
                    "269949297034680021197068305861611704798",
                    "319468279200322312880470592020819016731",
                    "290122554041854066012117958095344146121",
                    "96535096773082969195916570505487035845",
                    "107475669208982443873884905933708775633",
                    "209772744353159196754103385711112654844",
                    "7800251808227506299001248084145559067",
                    "254907524860923639394060310108841641697",
                    "165413800571597411813625153319895715889",
                    "162199014271737096248032780453401943324",
                    "133277064616047299573324087462328644913",
                    "177794789569952361295490371439859051901",
                    "335440199680276625201118121962410818498",
                    "221096926079377390158352905034407950620",
                    "273138362517490743228398017213900843385",
                    "198902284423494288984538749855241714000",
                    "72411397312066007861249840145048568592",
                    "205028678883462479790108783874110240778",
                    "8374139125472144043188941139702524809",
                    "65903840212741936286808157797942929196",
                    "61092395033666324253282066889778534270"
                  ]
                },
                "source": "https://github.com/tensorflow/tensorflow/commit/203214568f5bc237603dbab6e1fd389f1572f5c9",
                "target": {
                  "file": "tensorflow/core/kernels/mkl/mkl_requantize_per_channel_op.cc"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-37665-acc8689f",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "36215107757175077049419138183100645196",
                    "6964671574958464586434822176896109478",
                    "254529223669900739684206801063893842154",
                    "242381877165211974519269909759466066614"
                  ]
                },
                "source": "https://github.com/tensorflow/tensorflow/commit/9e62869465573cb2d9b5053f1fa02a81fce21d69",
                "target": {
                  "file": "tensorflow/core/kernels/mkl/mkl_requantization_range_per_channel_op.cc"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T14:28:12Z"
          }
        }
      ],
      "modified": "2026-10-20T14:28:12.317930819Z",
      "provider": "osv",
      "references": [
        "https://github.com/tensorflow/tensorflow/security/advisories/GHSA-v82p-hv3v-p6qp",
        "https://github.com/tensorflow/tensorflow/commit/203214568f5bc237603dbab6e1fd389f1572f5c9",
        "https://github.com/tensorflow/tensorflow/commit/9e62869465573cb2d9b5053f1fa02a81fce21d69"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-37665",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 389020,
  "published_at": "2021-08-12T23:15:07.333+00:00"
}