{"id":"CVE-2021-29602","published":"2021-05-14T19:21:25Z","modified":"2024-08-03T22:11:06Z","title":"Division by zero in TFLite's implementation of `DepthwiseConv`","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"TensorFlow is an end-to-end open source platform for machine learning. The implementation of the `DepthwiseConv` TFLite operator is vulnerable to a division by zero error(https://github.com/tensorflow/tensorflow/blob/1a8e885b864c818198a5b2c0cbbeca5a1e833bc8/tensorflow/lite/kernels/depthwise_conv.cc#L287-L288). An attacker can craft a model such that `input`'s fourth dimension 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.00189,"percentile":0.04948,"provenance":"source"},"cwes":[{"id":"CWE-369","name":"Divide By Zero"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-rf3h-xgv5-2q39","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/cbda3c6b2dbbd3fbdc482ff8c0170a78ec2e97d0","tags":["x_refsource_MISC"]}],"priority":{"score":2.7,"factors":[{"name":"EPSS percentile","points":0.99},{"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-rf3h-xgv5-2q39","PYSEC-2021-239"],"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-rf3h-xgv5-2q39","PYSEC-2021-530"],"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-rf3h-xgv5-2q39","PYSEC-2021-728"],"provenance":"source"}],"summary":{"text":"A division by zero flaw exists in TensorFlow's TFLite implementation of the DepthwiseConv operator, in the depthwise convolution kernel code. An attacker can exploit it by crafting a model whose input has a fourth dimension of zero, which requires local access and a low-privileged account to load or run the model.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:23:11Z"},"euvd":{"id":"EUVD-2021-0343","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2021-29602","children":[{"from":"CVE-2021-29602","to":"CVE-2022-21741","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/lite/kernels/depthwise_conv.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/cbda3c6b2dbbd3fbdc482ff8c0170a78ec2e97d0","https://github.com/tensorflow/tensorflow/commit/e5b0eec199c2d03de54fd6a7fd9275692218e2bc"],"basis":"rarely changed file"}]}]}}