CVE-2019-16778: Heap buffer overflow in `UnsortedSegmentSum` in TensorFlow

Published Dec 16, 2019
·
Updated

Impact

A heap buffer overflow in UnsortedSegmentSum can be produced when the Index template argument is int32. In this case datasize and numsegments fields are truncated from int64 to int32 and can produce negative numbers, resulting in accessing out of bounds heap memory.

This 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.

Patches

Patched by db4f9717c41bccc3ce10099ab61996b246099892 and released in all official releases after 1.15 and 2.0.

For more information Please consult SECURITY.md for more information regarding the security model and how to contact us with issues and questions.

Other sources

In TensorFlow before 1.15, a heap buffer overflow in UnsortedSegmentSum can be produced when the Index template argument is int32. In this case datasize and numsegments fields are truncated from int64 to int32 and can produce negative numbers, resulting in accessing out of bounds heap memory. This is unlikely to be exploitable and was detected and fixed internally in TensorFlow 1.15 and 2.0.

Affected Software

4 affected componentsFixes available
pip/tensorflow-gpu<1.15.0
1.15.0
pip/tensorflow-cpu<1.15.0
1.15.0
pip/tensorflow<1.15.0
1.15.0
Google TensorFlow>=1.0.0<1.15.0

Event History

Dec 16, 2019
CVE Published
via MITRE·08:15 PM
Data Sourced
via MITRE·08:15 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·08:17 PM
Data Sourced
via NVD·09:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2019-16778?

CVE-2019-16778 is classified as a high severity vulnerability due to the heap buffer overflow it causes.

2

How do I fix CVE-2019-16778?

To mitigate CVE-2019-16778, upgrade TensorFlow to version 1.15.0 or later.

3

Which versions of TensorFlow are affected by CVE-2019-16778?

CVE-2019-16778 affects TensorFlow versions from 1.0.0 up to, but not including, 1.15.0.

4

What types of systems are impacted by CVE-2019-16778?

CVE-2019-16778 impacts systems running vulnerable versions of TensorFlow in any environment.

5

What does CVE-2019-16778 exploit?

CVE-2019-16778 exploits a heap buffer overflow that can occur when specific template arguments are used.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203