CVE-2019-16778: Heap Buffer Overflow in TensorFlow-GPU
Summary
CVE-2019-16778: In TensorFlow before 1.15, a heap buffer overflow in UnsortedSegmentSum can be produced when the Index template argument is int32. Affects tensorflow-gpu across 2 version ranges.
>= 1.0.0, < 1.15.0
< db4f9717c41bccc3ce10099ab61996b246099892
Fixed in db4f9717c41bccc3ce10099ab61996b246099892. How to fix ↓
Also tracked for
- tensorflow · PyPI
- tensorflow-cpu · PyPI
- tensorflow · PyPI
The same CVE-2019-16778 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
TensorFlow-GPU is an open-source machine learning framework developed by Google. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning models. TensorFlow-GPU leverages the power of GPUs to accelerate the training and inference processes. However, a vulnerability has been identified in versions before 1.15, which can lead to a heap buffer overflow in the UnsortedSegmentSum function when the Index template argument is int32. This vulnerability was internally detected and fixed in TensorFlow 1.15 and 2.0.
Vulnerability Detail
The vulnerability arises due to a truncation of the data_size and num_segments fields from int64 to int32 when the Index template argument is int32. This truncation can result in negative numbers, leading to out-of-bounds memory access. While the exploitability of this vulnerability is unlikely, it poses a risk of accessing unintended heap memory. The issue has been addressed in TensorFlow 1.15 and 2.0.
How To Fix
Latest published version: 2.12.0 as of 22 Oct 2026
pip install --upgrade "tensorflow-gpu==2.12.0"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
db4f9717c41bccc3ce10099ab61996b246099892
This is the first release that contains the fix.
pip install --upgrade "tensorflow-gpu==db4f9717c41bccc3ce10099ab61996b246099892"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no specific workaround provided for this vulnerability. Upgrading to the fixed version is the recommended solution.
Conclusion
The identified vulnerability in TensorFlow-GPU versions before 1.15 can lead to a heap buffer overflow. While the exploitability of this issue is unlikely, it is crucial to upgrade to the fixed version to ensure the integrity and security of machine learning models. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow-gpu →
FAQ
TensorFlow-GPU is an open-source machine learning framework developed by Google that leverages GPUs for accelerated training and inference.
The vulnerability can result in a heap buffer overflow, potentially leading to unintended memory access. However, the exploitability of this issue is unlikely.
Versions before 1.15 of TensorFlow-GPU are affected by this vulnerability.
Yes, the vulnerability has been fixed in TensorFlow 1.15 and 2.0.
No specific workaround is provided. Upgrading to the fixed version is recommended.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.