{"id":"CVE-2019-16778","aliases":["GHSA-844w-j86r-4x2j","PYSEC-2019-209","PYSEC-2019-227","PYSEC-2019-234"],"title":"Heap buffer overflow in `UnsortedSegmentSum` in TensorFlow","summary":"Heap buffer overflow in `UnsortedSegmentSum` in TensorFlow","severity":"low","cvss":2.6,"cvssVector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:N/A:L","vendor":"tensorflow","product":"tensorflow","ecosystem":"pip","affected":["tensorflow < 1.15.0","tensorflow-cpu < 1.15.0","tensorflow-gpu < 1.15.0"],"patched":["tensorflow 1.15.0","tensorflow-cpu 1.15.0","tensorflow-gpu 1.15.0"],"published":"2019-12-16","updated":"2026-07-08","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-844w-j86r-4x2j","references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-844w-j86r-4x2j"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2019-16778"},{"url":"https://github.com/tensorflow/tensorflow/commit/db4f9717c41bccc3ce10099ab61996b246099892"},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2019-227.yaml"},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2019-234.yaml"},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2019-209.yaml"},{"url":"https://github.com/tensorflow/tensorflow"},{"url":"https://github.com/tensorflow/tensorflow/blob/master/tensorflow/security/advisory/tfsa-2019-002.md"}],"tags":["osv","pip"],"epss":0.00788,"epssPercentile":0.54234,"ingestedAt":"2026-07-08T18:25:47.289Z","slug":"CVE-2019-16778","body":"## Overview\n\n### Impact\n\nA heap buffer overflow in `UnsortedSegmentSum` can be produced when the `Index` template argument is `int32`. In this case `data_size` and `num_segments` fields are truncated from `int64` to `int32` and can produce negative numbers, resulting in accessing out of bounds heap memory.\n\nThis is unlikely to be exploitable and was detected and fixed internally. We are making the security advisory only to notify users that it is better to update to TensorFlow 1.15 or 2.0 or later as these versions already have this fixed.\n\n### Patches\n\nPatched by db4f9717c41bccc3ce10099ab61996b246099892 and released in all official releases after 1.15 and 2.0.\n\n### For more information\nPlease consult [`SECURITY.md`](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md) for more information regarding the security model and how to contact us with issues and questions.\n\n## Affected packages\n\n- `tensorflow < 1.15.0`\n- `tensorflow-cpu < 1.15.0`\n- `tensorflow-gpu < 1.15.0`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `tensorflow 1.15.0`\n- `tensorflow-cpu 1.15.0`\n- `tensorflow-gpu 1.15.0`","depth":"sunlit","depthScore":14,"depthScoreParts":{"impact":14.3,"likelihood":0.2,"exploitation":0,"ransomware":0},"changes":[]}