{"id":"BIT-tensorflow-2021-29554","summary":"Division by 0 in `DenseCountSparseOutput`","details":"TensorFlow is an end-to-end open source platform for machine learning. An attacker can cause a denial of service via a FPE runtime error in `tf.raw_ops.DenseCountSparseOutput`. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/efff014f3b2d8ef6141da30c806faf141297eca1/tensorflow/core/kernels/count_ops.cc#L123-L127) computes a divisor value from user data but does not check that the result is 0 before doing the division. Since `data` is given by the `values` argument, `num_batch_elements` is 0. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, and TensorFlow 2.3.3, as these are also affected.","aliases":["CVE-2021-29554","GHSA-qg48-85hg-mqc5","PYSEC-2021-191","PYSEC-2021-482","PYSEC-2021-680"],"modified":"2025-05-20T10:02:07.006Z","published":"2024-03-06T11:19:17.329Z","database_specific":{"cpes":["cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*"],"severity":"Medium"},"references":[{"type":"WEB","url":"https://github.com/tensorflow/tensorflow/commit/da5ff2daf618591f64b2b62d9d9803951b945e9f"},{"type":"WEB","url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-qg48-85hg-mqc5"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29554"}],"affected":[{"package":{"name":"tensorflow","ecosystem":"Bitnami","purl":"pkg:bitnami/tensorflow"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.1.4"},{"introduced":"2.2.0"},{"fixed":"2.2.3"},{"introduced":"2.3.0"},{"fixed":"2.3.3"},{"introduced":"2.4.0"},{"fixed":"2.4.2"}]}],"database_specific":{"source":"https://github.com/bitnami/vulndb/tree/main/data/tensorflow/BIT-tensorflow-2021-29554.json"},"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"}]}],"schema_version":"1.7.3"}