{"id":"CVE-2022-21725","published":"2022-02-03T12:21:02Z","modified":"2025-05-05T16:33:11Z","title":"Division by zero in Tensorflow","vendor":null,"product":null,"tier":"tail","description":{"text":"Tensorflow is an Open Source Machine Learning Framework. The estimator for the cost of some convolution operations can be made to execute a division by 0. The function fails to check that the stride argument is strictly positive. Hence, the fix is to add a check for the stride argument to ensure it is valid. 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.00789,"percentile":0.57156,"provenance":"source"},"cwes":[{"id":"CWE-369","name":"Divide By Zero"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-v3f7-j968-4h5f","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/3218043d6d3a019756607643cf65574fbfef5d7a","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/blob/ffa202a17ab7a4a10182b746d230ea66f021fe16/tensorflow/core/grappler/costs/op_level_cost_estimator.cc#L189-L198","tags":["x_refsource_MISC"]}],"priority":{"score":16.0,"factors":[{"name":"EPSS percentile","points":11.43},{"name":"CVSS severity","points":4.55}]},"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-25T15:47:17.845375Z","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-v3f7-j968-4h5f","PYSEC-2026-3242"],"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-v3f7-j968-4h5f","PYSEC-2022-49"],"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-v3f7-j968-4h5f","PYSEC-2022-104"],"provenance":"source"}],"summary":{"text":"The flaw is a division-by-zero bug in TensorFlow's cost estimator for certain convolution operations, which fails to validate that the stride argument is strictly positive. An attacker with low-privilege access over the network, with no user interaction, can trigger the division by zero and crash the affected process, causing a denial of service.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:27:29Z"},"euvd":{"id":"EUVD-2022-0288","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2022-21725","children":[{"from":"CVE-2022-21725","to":"CVE-2022-23576","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/grappler/costs/BUILD","tensorflow/core/grappler/costs/op_level_cost_estimator.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/3218043d6d3a019756607643cf65574fbfef5d7a","https://github.com/tensorflow/tensorflow/commit/b9bd6cfd1c50e6807846af9a86f9b83cafc9c8ae"],"basis":"rarely changed file"}]}]}}