{"id":"CVE-2021-29598","published":"2021-05-14T19:21:51Z","modified":"2024-08-03T22:11:06Z","title":"Division by zero in TFLite's implementation of `SVDF`","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"TensorFlow is an end-to-end open source platform for machine learning. The implementation of the `SVDF` TFLite operator is vulnerable to a division by zero error(https://github.com/tensorflow/tensorflow/blob/7f283ff806b2031f407db64c4d3edcda8fb9f9f5/tensorflow/lite/kernels/svdf.cc#L99-L102). An attacker can craft a model such that `params->rank` would be 0. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.","provenance":"source","from":"CVE.org"},"cvss":{"score":2.5,"severity":"LOW","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00201,"percentile":0.10185,"provenance":"source"},"cwes":[{"id":"CWE-369","name":"Divide By Zero"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-pmpr-55fj-r229","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/6841e522a3e7d48706a02e8819836e809f738682","tags":["x_refsource_MISC"]}],"priority":{"score":3.8,"factors":[{"name":"EPSS percentile","points":2.04},{"name":"CVSS severity","points":1.75}]},"vendorSlug":"tensorflow","affectedVersions":[{"vendor":"tensorflow","product":"tensorflow","versions":["< 2.1.4",">= 2.2.0, < 2.2.3",">= 2.3.0, < 2.3.3",">= 2.4.0, < 2.4.2"]}],"affected":[{"ecosystem":"PyPI","package":"tensorflow","vulnerableRanges":["<2.1.4",">=2.2.0, <2.2.3",">=2.3.0, <2.3.3",">=2.4.0, <2.4.2"],"patched":["2.1.4","2.2.3","2.3.3","2.4.2"],"from":["GHSA-pmpr-55fj-r229","PYSEC-2021-235"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-cpu","vulnerableRanges":["<2.1.4",">=2.2.0, <2.2.3",">=2.3.0, <2.3.3",">=2.4.0, <2.4.2"],"patched":["2.1.4","2.2.3","2.3.3","2.4.2"],"from":["GHSA-pmpr-55fj-r229","PYSEC-2021-526"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-gpu","vulnerableRanges":["<2.1.4",">=2.2.0, <2.2.3",">=2.3.0, <2.3.3",">=2.4.0, <2.4.2"],"patched":["2.1.4","2.2.3","2.3.3","2.4.2"],"from":["GHSA-pmpr-55fj-r229","PYSEC-2021-724"],"provenance":"source"}],"summary":{"text":"A division-by-zero flaw exists in TensorFlow's TFLite implementation of the SVDF operator, where a crafted model that sets the rank parameter to zero triggers the error. An attacker who can supply a malicious model to a local TFLite-based process, with no user interaction and only low-privilege access, can cause a denial of service by crashing the application.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:22:51Z"},"euvd":{"id":"EUVD-2021-0339","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2020-15211","children":[{"from":"CVE-2021-29598","to":"CVE-2021-37681","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/lite/kernels/svdf.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/6841e522a3e7d48706a02e8819836e809f738682","https://github.com/tensorflow/tensorflow/commit/5b048e87e4e55990dae6b547add4dae59f4e1c76"],"basis":"rarely changed file"}]},{"from":"CVE-2021-29598","to":"CVE-2021-37682","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/lite/kernels/svdf.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/6841e522a3e7d48706a02e8819836e809f738682","https://github.com/tensorflow/tensorflow/commit/4a91f2069f7145aab6ba2d8cfe41be8a110c18a5","https://github.com/tensorflow/tensorflow/commit/537bc7c723439b9194a358f64d871dd326c18887"],"basis":"shared function","functions":["Prepare"]}]}]}}