{"id":"CVE-2021-37675","aliases":["CVE-2021-37675","GHSA-9c8h-2mv3-49ww","BIT-TENSORFLOW-2021-37675","PYSEC-2021-297","PYSEC-2021-588","PYSEC-2021-786"],"related":[],"kind":"vulnerability","state":"published","title":"Division by 0 in most convolution operators in TensorFlow","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nMost 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:\n\n```python\nimport tensorflow as tf\n\ntf.compat.v1.disable_v2_behavior()\ntf.raw_ops.Conv2D(\n  input = tf.constant([], shape=[0, 0, 0, 0], dtype=tf.float32),\n  filter = tf.constant([], shape=[0, 0, 0, 0], dtype=tf.float32),\n  strides = [1, 1, 1, 1],\n  padding = \"SAME\")\n```\n\nThe 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.\n\n### Patches\nWe have patched the issue in GitHub commit [8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4](https://github.com/tensorflow/tensorflow/commit/8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4).\n\nThe 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.\n\n### For more information\nPlease consult [our security guide](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md) for more information regarding the security model and how to contact us with issues and questions.\n\n### Attribution\nThis vulnerability has been reported by Yakun Zhang of Baidu Security.","format":"markdown","source":"ghsa"},{"lang":"es","text":"TensorFlow es una plataforma de código abierto de extremo a extremo para el aprendizaje automático. En las versiones afectadas, la mayoría de las implementaciones de los operadores de convolución en TensorFlow están afectadas por una vulnerabilidad de división por 0 en la que un atacante puede desencadenar una denegación de servicio por medio de un bloqueo. La [implementación] de la forma (https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/framework/common_shape_fns.cc#L577) carece de varias comprobaciones antes de realizar divisiones y operaciones de módulo. Hemos parcheado el problema en el commit 8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4 de GitHub. La corrección será incluida en TensorFlow versión 2.6.0. También seleccionaremos este commit en TensorFlow versión 2.5.1, TensorFlow versión 2.4.3, y TensorFlow versión 2.3.4, ya que estos también están afectados y todavía están en el rango de soporte.","source":"nvd"}],"published":"2021-08-12T21:45:11.000Z","modified":"2026-09-08T08:45:16.336Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:L/AC:L/Au:N/C:N/I:N/A:P","score":2.1,"rating":"LOW"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-369"],"affected":[{"ranges":[{"version":">= 2.5.0, < 2.5.1","status":"affected"},{"version":">= 2.4.0, < 2.4.3","status":"affected"},{"version":"< 2.3.4","status":"affected"}],"vendor":"tensorflow","product":"tensorflow","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.3.4"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.4.0","status":"affected","fixed":"2.4.3"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.5.0","status":"affected","fixed":"2.5.1"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.3.4"}],"ecosystem":"PyPI","package":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.4.0","status":"affected","fixed":"2.4.3"}],"ecosystem":"PyPI","package":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.5.0","status":"affected","fixed":"2.5.1"}],"ecosystem":"PyPI","package":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.3.4"}],"ecosystem":"PyPI","package":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.4.0","status":"affected","fixed":"2.4.3"}],"ecosystem":"PyPI","package":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.5.0","status":"affected","fixed":"2.5.1"}],"ecosystem":"PyPI","package":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.3.0","fixed":"2.3.4"},{"status":"affected","introduced":"2.4.0","fixed":"2.4.3"},{"status":"affected","version":"2.5.0"},{"status":"affected","version":"2.6.0"},{"status":"affected","version":"2.6.0"},{"status":"affected","version":"2.6.0"}],"vendor":"google","product":"tensorflow","cpe":"cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4"},{"type":"ecosystem","introduced":"2.3.0","status":"affected","fixed":"2.3.4"},{"type":"ecosystem","introduced":"2.4.0","status":"affected","fixed":"2.4.3"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","repo":"https://github.com/tensorflow/tensorflow","source":"pysec"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4"},{"type":"ecosystem","introduced":"2.3.0","status":"affected","fixed":"2.3.4"},{"type":"ecosystem","introduced":"2.4.0","status":"affected","fixed":"2.4.3"}],"ecosystem":"PyPI","package":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","repo":"https://github.com/tensorflow/tensorflow","source":"pysec"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4"},{"type":"ecosystem","introduced":"2.3.0","status":"affected","fixed":"2.3.4"},{"type":"ecosystem","introduced":"2.4.0","status":"affected","fixed":"2.4.3"}],"ecosystem":"PyPI","package":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","repo":"https://github.com/tensorflow/tensorflow","source":"pysec"},{"ranges":[{"type":"semver","introduced":"2.3.0","status":"affected","fixed":"2.3.4"},{"type":"semver","introduced":"2.4.0","status":"affected","fixed":"2.4.3"},{"type":"semver","introduced":"2.5.0","status":"affected","fixed":"2.5.1"}],"ecosystem":"Bitnami","package":"tensorflow","purl":"pkg:bitnami/tensorflow","source":"bitnami"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-9c8h-2mv3-49ww","tags":["advisory","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow/commit/8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4","tags":["advisory","fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-37675","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2021-588.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2021-786.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2021-297.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/tensorflow/tensorflow","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-37675","url":"https://www.cve.org/CVERecord?id=CVE-2021-37675","licence":"CVE Terms of Use","modified":"2024-08-04T01:23:01.430Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-9c8h-2mv3-49ww","url":"https://github.com/advisories/GHSA-9c8h-2mv3-49ww","licence":"CC-BY-4.0","modified":"2026-07-08T06:28:05.808Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-37675","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-37675","licence":"Public domain","modified":"2026-06-17T04:00:57.560Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-297","url":"https://osv.dev/vulnerability/PYSEC-2021-297","licence":"CC-BY-4.0","modified":"2023-12-06T01:01:23.663Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-588","url":"https://osv.dev/vulnerability/PYSEC-2021-588","licence":"CC-BY-4.0","modified":"2023-12-06T01:01:23.663Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-786","url":"https://osv.dev/vulnerability/PYSEC-2021-786","licence":"CC-BY-4.0","modified":"2023-12-06T01:01:23.663Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-TENSORFLOW-2021-37675","url":"https://osv.dev/vulnerability/BIT-TENSORFLOW-2021-37675","licence":"Apache-2.0","modified":"2026-09-08T08:45:16.336Z"}],"updatedAt":"2026-11-25T22:58:03.197Z","epss":{"score":0.00157,"percentile":0.05166,"date":"2026-12-01T12:00:22.000Z"}}