Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-37675

TensorFlow is an end-to-end open source platform for machine learning. In affected versions most implementations of convolution operators in TensorFlow are affected by a division by 0 vulnerability where an attacker can trigger a denial of service via a crash. The shape inference [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/framework/common_shape_fns.cc#L577) is missing several validations before doing divisions and modulo operations. We have patched the issue in GitHub commit 8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4. 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-37675
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 12:52 UTC · Revision 1

Source evidence

CVE-2021-37675

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 most implementations of convolution operators in TensorFlow are affected by a division by 0 vulnerability where an attacker can trigger a denial of service via a crash. The shape inference [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/framework/common_shape_fns.cc#L577) is missing several validations before doing divisions and modulo operations. We have patched the issue in GitHub commit 8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4. 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-37675
Complete source record
{
  "id": "fa349aaed3ce3be7e3cc13df478b37ca2d9f6fcbe49754afc52661ed1770ba5e",
  "url": "https://osv.dev/vulnerability/CVE-2021-37675",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-37675",
    "summary": "TensorFlow is an end-to-end open source platform for machine learning. In affected versions most implementations of convolution operators in TensorFlow are affected by a division by 0 vulnerability where an attacker can trigger a denial of service via a crash. The shape inference [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/framework/common_shape_fns.cc#L577) is missing several validations before doing divisions and modulo operations. We have patched the issue in GitHub commit 8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4. 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-37675",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-37675",
      "aliases": [
        "BIT-tensorflow-2021-37675",
        "CVE-2021-37675",
        "GHSA-9c8h-2mv3-49ww",
        "PYSEC-2021-297",
        "PYSEC-2021-588",
        "PYSEC-2021-786"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/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": "8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4"
                }
              ],
              "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": "8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4"
                      }
                    ],
                    "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-37675.json",
            "vanir_signatures": [
              {
                "id": "CVE-2021-37675-35a5dfd3",
                "digest": {
                  "length": 1037,
                  "function_hash": "139300008831957807109938534985072781749"
                },
                "source": "https://github.com/tensorflow/tensorflow/commit/8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4",
                "target": {
                  "file": "tensorflow/core/framework/common_shape_fns.cc",
                  "function": "SparseReduceShapeFn"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-37675-815f1477",
                "digest": {
                  "length": 2789,
                  "function_hash": "313207413046476017004764754741185477472"
                },
                "source": "https://github.com/tensorflow/tensorflow/commit/8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4",
                "target": {
                  "file": "tensorflow/core/framework/common_shape_fns.cc",
                  "function": "Conv3DShape"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-37675-8fcaaa3e",
                "digest": {
                  "length": 3789,
                  "function_hash": "239097322949781678466209856497850224007"
                },
                "source": "https://github.com/tensorflow/tensorflow/commit/8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4",
                "target": {
                  "file": "tensorflow/core/framework/common_shape_fns.cc",
                  "function": "Conv2DShapeImpl"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-37675-e1ce45d9",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "27202055861790518621992168128277313342",
                    "335816987617188343671838747481534471153",
                    "151191980492798298540474429191283235778",
                    "231136939670966233097268816227151954907",
                    "201611188228584891933571246910422497751",
                    "221593666453661383249650518647933333887",
                    "186750339638161653062420929098899214813",
                    "138475715708402382070040369199730422431",
                    "261641260846244636163019243082187269656",
                    "335816987617188343671838747481534471153",
                    "151191980492798298540474429191283235778",
                    "231136939670966233097268816227151954907",
                    "201611188228584891933571246910422497751",
                    "221593666453661383249650518647933333887",
                    "186750339638161653062420929098899214813",
                    "138475715708402382070040369199730422431",
                    "95604568184060884889419034163600281691",
                    "184694823363935936153666820887614190473",
                    "310275658796724341431853974608508452270",
                    "50867722205679937420439339874425015018"
                  ]
                },
                "source": "https://github.com/tensorflow/tensorflow/commit/8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4",
                "target": {
                  "file": "tensorflow/core/framework/common_shape_fns.cc"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T14:28:21Z"
          }
        }
      ],
      "modified": "2026-10-20T14:28:21.558413655Z",
      "provider": "osv",
      "references": [
        "https://github.com/tensorflow/tensorflow/security/advisories/GHSA-9c8h-2mv3-49ww",
        "https://github.com/tensorflow/tensorflow/commit/8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-37675",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 389044,
  "published_at": "2021-08-12T22:15:08.557+00:00"
}