{"cve":"CVE-2021-41195","nvd":{"published":"2021-11-05T20:15:07.707","modified":"2026-06-17T04:08:04.293","status":"Modified","description":"TensorFlow is an open source platform for machine learning. In affected versions the implementation of `tf.math.segment_*` operations results in a `CHECK`-fail related abort (and denial of service) if a segment id in `segment_ids` is large. This is similar to CVE-2021-29584 (and similar other reported vulnerabilities in TensorFlow, localized to specific APIs): the implementation (both on CPU and GPU) computes the output shape using `AddDim`. However, if the number of elements in the tensor overflows an `int64_t` value, `AddDim` results in a `CHECK` failure which provokes a `std::abort`. Instead, code should use `AddDimWithStatus`. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5},"cwes":["CWE-190"],"references":["https://github.com/tensorflow/tensorflow/commit/e9c81c1e1a9cd8dd31f4e83676cab61b60658429","https://github.com/tensorflow/tensorflow/issues/46888","https://github.com/tensorflow/tensorflow/pull/51733","https://github.com/tensorflow/tensorflow/security/advisories/GHSA-cq76-mxrc-vchh","https://github.com/tensorflow/tensorflow/commit/e9c81c1e1a9cd8dd31f4e83676cab61b60658429"],"products":["google:tensorflow"],"source":"nvd","synced_at":"2026-10-19T21:24:39.218183596+00:00"},"epss":{"cve":"CVE-2021-41195","score":0.00212,"percentile":0.11463,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-cq76-mxrc-vchh","url":"https://osv.dev/vulnerability/GHSA-cq76-mxrc-vchh","summary":"Crash in `tf.math.segment_*` operations","modified":"2026-07-08T06:29:50.454632305Z","packages":[{"ecosystem":"PyPI","name":"tensorflow","purl":"pkg:pypi/tensorflow","ranges":[">=2.6.0 <2.6.1"],"fixed":["2.6.1"]},{"ecosystem":"PyPI","name":"tensorflow","purl":"pkg:pypi/tensorflow","ranges":[">=2.5.0 <2.5.2"],"fixed":["2.5.2"]},{"ecosystem":"PyPI","name":"tensorflow","purl":"pkg:pypi/tensorflow","ranges":["<2.4.4"],"fixed":["2.4.4"]},{"ecosystem":"PyPI","name":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","ranges":[">=2.6.0 <2.6.1"],"fixed":["2.6.1"]},{"ecosystem":"PyPI","name":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","ranges":[">=2.5.0 <2.5.2"],"fixed":["2.5.2"]},{"ecosystem":"PyPI","name":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","ranges":["<2.4.4"],"fixed":["2.4.4"]},{"ecosystem":"PyPI","name":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","ranges":[">=2.6.0 <2.6.1"],"fixed":["2.6.1"]},{"ecosystem":"PyPI","name":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","ranges":[">=2.5.0 <2.5.2"],"fixed":["2.5.2"]},{"ecosystem":"PyPI","name":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","ranges":["<2.4.4"],"fixed":["2.4.4"]}]},{"id":"PYSEC-2021-842","url":"https://osv.dev/vulnerability/PYSEC-2021-842","summary":"","modified":"2023-12-06T01:01:33.449935Z","packages":[{"ecosystem":"PyPI","name":"tensorflow","purl":"pkg:pypi/tensorflow","ranges":["<2.4.4",">=2.5.0 <2.5.2",">=2.6.0 <2.6.1"],"fixed":["2.4.4","2.5.2","2.6.1"]}]},{"id":"PYSEC-2021-844","url":"https://osv.dev/vulnerability/PYSEC-2021-844","summary":"","modified":"2023-12-06T01:01:33.449935Z","packages":[{"ecosystem":"PyPI","name":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","ranges":["<2.4.4",">=2.5.0 <2.5.2",">=2.6.0 <2.6.1"],"fixed":["2.4.4","2.5.2","2.6.1"]}]},{"id":"PYSEC-2021-846","url":"https://osv.dev/vulnerability/PYSEC-2021-846","summary":"","modified":"2023-12-06T01:01:33.449935Z","packages":[{"ecosystem":"PyPI","name":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","ranges":["<2.4.4",">=2.5.0 <2.5.2",">=2.6.0 <2.6.1"],"fixed":["2.4.4","2.5.2","2.6.1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}