{"id":"CVE-2022-21741","published":"2022-02-03T14:27:31Z","modified":"2025-05-05T16:30:38Z","title":"Division by zero in TFLite","vendor":null,"product":null,"tier":"tail","description":{"text":"Tensorflow is an Open Source Machine Learning Framework. ### Impact An attacker can craft a TFLite model that would trigger a division by zero in the implementation of depthwise convolutions. The parameters of the convolution can be user controlled and are also used within a division operation to determine the size of the padding that needs to be added before applying the convolution. There is no check before this division that the divisor is strictly positive. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00828,"percentile":0.5839,"provenance":"source"},"cwes":[{"id":"CWE-369","name":"Divide By Zero"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-428x-9xc2-m8mj","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/e5b0eec199c2d03de54fd6a7fd9275692218e2bc","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/blob/5100e359aef5c8021f2e71c7b986420b85ce7b3d/tensorflow/lite/kernels/depthwise_conv.cc#L96","tags":["x_refsource_MISC"]}],"priority":{"score":16.2,"factors":[{"name":"EPSS percentile","points":11.68},{"name":"CVSS severity","points":4.55}]},"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-25T15:47:04.297713Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"tensorflow","vulnerableRanges":["<2.5.3",">=2.6.0, <2.6.3",">=2.7.0, <2.7.1"],"patched":["2.5.3","2.6.3","2.7.1"],"from":["GHSA-428x-9xc2-m8mj","PYSEC-2026-3095"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-cpu","vulnerableRanges":["<2.5.3",">=2.6.0, <2.6.3",">=2.7.0, <2.7.1"],"patched":["2.5.3","2.6.3","2.7.1"],"from":["GHSA-428x-9xc2-m8mj","PYSEC-2022-65"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-gpu","vulnerableRanges":["<2.5.3",">=2.6.0, <2.6.3",">=2.7.0, <2.7.1"],"patched":["2.5.3","2.6.3","2.7.1"],"from":["GHSA-428x-9xc2-m8mj","PYSEC-2022-120"],"provenance":"source"}],"summary":{"text":"The flaw is a division-by-zero bug in the depthwise convolution implementation of TensorFlow Lite, where the divisor used to compute padding size is not checked to be strictly positive. An attacker who can supply a crafted TFLite model with user-controlled convolution parameters can trigger the fault, and per the attack vector this is reachable over the network with low complexity, requiring low privileges and no user interaction, with the impact limited to availability.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:26:32Z"},"euvd":{"id":"EUVD-2022-0304","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2021-29602","parents":[{"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"}]}]}}