{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2021-37680","id":"CVE-2021-37680","title":"Division by zero in TFLite in TensorFlow","description":"TensorFlow is an end-to-end open source platform for machine learning. In affected versions the implementation of fully connected layers in TFLite is [vulnerable to a division by zero error](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/lite/kernels/fully_connected.cc#L226). We have patched the issue in GitHub commit 718721986aa137691ee23f0363886","descriptionLong":"TensorFlow is an end-to-end open source platform for machine learning. In affected versions the implementation of fully connected layers in TFLite is [vulnerable to a division by zero error](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/lite/kernels/fully_connected.cc#L226). We have patched the issue in GitHub commit 718721986aa137691ee23f03638867151f74935f. 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.","published":"2021-08-12T21:45:17.000Z","updated":"2026-10-20T14:10:51.540573133Z","reserved":"2021-07-29T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"4.0","score":null,"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","source":"GitHub"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"github.com"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"OSV"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"GitHub"},{"version":"2.0","score":2.1,"vector":"AV:L/AC:L/Au:N/C:N/I:N/A:P","rating":"low","source":"NVD"}],"rating":"medium","products":["tensorflow"],"affectedProducts":[{"vendor":"tensorflow","product":"tensorflow","defaultStatus":null,"versions":[{"status":"affected","version":">= 2.5.0, < 2.5.1"},{"status":"affected","version":">= 2.4.0, < 2.4.3"},{"status":"affected","version":"< 2.3.4"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"tensorflow","purl":"pkg:pypi/tensorflow","ranges":["<2.3.4",">=2.4.0 <2.4.3",">=2.5.0 <2.5.1",">=2.3.0 <2.3.4"],"fixed":["2.3.4","2.4.3","2.5.1"],"advisory":"GHSA-cfpj-3q4c-jhvr"},{"ecosystem":"PyPI","name":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","ranges":["<2.3.4",">=2.4.0 <2.4.3",">=2.5.0 <2.5.1",">=2.3.0 <2.3.4"],"fixed":["2.3.4","2.4.3","2.5.1"],"advisory":"GHSA-cfpj-3q4c-jhvr"},{"ecosystem":"PyPI","name":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","ranges":["<2.3.4",">=2.4.0 <2.4.3",">=2.5.0 <2.5.1",">=2.3.0 <2.3.4"],"fixed":["2.3.4","2.4.3","2.5.1"],"advisory":"GHSA-cfpj-3q4c-jhvr"}],"cwes":["CWE-369"],"aliases":["BIT-tensorflow-2021-37680","GHSA-cfpj-3q4c-jhvr","PYSEC-2021-302","PYSEC-2021-593","PYSEC-2021-791"],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-cfpj-3q4c-jhvr","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/tensorflow/tensorflow/commit/718721986aa137691ee23f03638867151f74935f","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-37680","tags":["advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2021-593.yaml","tags":["web"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2021-791.yaml","tags":["web"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2021-302.yaml","tags":["web"]},{"url":"https://github.com/tensorflow/tensorflow","tags":["package"]},{"url":"https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/lite/kernels/fully_connected.cc#L226","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.00152,"epssPercentile":0.04453,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2021-37680","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-37680","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2021-37680","ok":true,"note":"3 packages"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-cfpj-3q4c-jhvr","ok":true,"note":"GHSA-cfpj-3q4c-jhvr"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-37680","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}