Despite the critical CVSS 9.8, TensorFlow itself characterized this as 'unlikely to be exploitable' — EPSS (0.325%) confirms negligible real-world exploitation after 5+ years. Any deployment still running TensorFlow < 1.15 should upgrade as a hygiene action, not an emergency. Organizations on TF 1.15+ or any 2.x release are already patched.
What is the risk?
Headline risk (CVSS 9.8, network-accessible, no auth required) is materially overstated relative to practical exploitability. Triggering the vulnerability requires crafting inputs to UnsortedSegmentSum that induce int64→int32 truncation producing negative segment counts — a non-trivial precondition. The EPSS score (0.325%) and absence from CISA KEV confirm near-zero real-world exploitation over 5+ years. Primary residual risk is legacy TF (<1.15) deployments in network-exposed ML serving infrastructure.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| TensorFlow | pip | — | No patch |
| TensorFlow | pip | < 1.15.0 | 1.15.0 |
| TensorFlow | pip | < 1.15.0 | 1.15.0 |
| TensorFlow | pip | < 1.15.0 | 1.15.0 |
How severe is it?
What is the attack surface?
What should I do?
4 steps-
Upgrade tensorflow, tensorflow-cpu, or tensorflow-gpu to ≥ 1.15.0 or any 2.x release via pip.
-
Audit running workloads for legacy TF versions using 'pip list' or SBOM scanning of container images in CI/CD.
-
If immediate upgrade is blocked, restrict network access to TF serving endpoints and enforce input shape validation before operations reach UnsortedSegmentSum.
-
Detection: add TF version checks to pipeline gates and container base image scanning policies; alert on any tensorflow <1.15 in production.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2019-16778?
Despite the critical CVSS 9.8, TensorFlow itself characterized this as 'unlikely to be exploitable' — EPSS (0.325%) confirms negligible real-world exploitation after 5+ years. Any deployment still running TensorFlow < 1.15 should upgrade as a hygiene action, not an emergency. Organizations on TF 1.15+ or any 2.x release are already patched.
Is CVE-2019-16778 actively exploited?
No confirmed active exploitation of CVE-2019-16778 has been reported, but organizations should still patch proactively.
How to fix CVE-2019-16778?
1. Upgrade tensorflow, tensorflow-cpu, or tensorflow-gpu to ≥ 1.15.0 or any 2.x release via pip. 2. Audit running workloads for legacy TF versions using 'pip list' or SBOM scanning of container images in CI/CD. 3. If immediate upgrade is blocked, restrict network access to TF serving endpoints and enforce input shape validation before operations reach UnsortedSegmentSum. 4. Detection: add TF version checks to pipeline gates and container base image scanning policies; alert on any tensorflow <1.15 in production.
What systems are affected by CVE-2019-16778?
This vulnerability affects the following AI/ML architecture patterns: training pipelines, model serving, ML inference APIs.
What is the CVSS score for CVE-2019-16778?
CVE-2019-16778 has a CVSS v3.1 base score of 9.8 (CRITICAL). The EPSS exploitation probability is 0.78%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001 AI Software AML.T0043 Craft Adversarial Data AML.T0049 Exploit Public-Facing Application Compliance Controls Affected
What are the technical details?
Original Advisory
In TensorFlow before 1.15, a 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. This is unlikely to be exploitable and was detected and fixed internally in TensorFlow 1.15 and 2.0.
Exploitation Scenario
An adversary with access to a TF-backed REST inference endpoint (e.g., TensorFlow Serving exposing a SavedModel) submits crafted input tensors with values designed to overflow int32 bounds when passed to UnsortedSegmentSum. The truncated negative num_segments value causes an out-of-bounds write into heap memory. With knowledge of the heap layout of the serving process, this can be weaponized for remote code execution — granting the attacker a foothold on the ML serving host with access to model weights, API keys for downstream services, and training data repositories connected to that infrastructure.
Weaknesses (CWE)
CWE-122 Heap-based Buffer Overflow
Primary
CWE-681 Incorrect Conversion between Numeric Types
Primary
CWE-681 Incorrect Conversion between Numeric Types
Primary
CWE-122 Heap-based Buffer Overflow CWE-122 — Heap-based Buffer Overflow: A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
- Pre-design: Use a language or compiler that performs automatic bounds checking.
- [Architecture and Design] Use an abstraction library to abstract away risky APIs. Not a complete solution.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H References
- github.com/advisories/GHSA-844w-j86r-4x2j
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2019-227.yaml
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2019-234.yaml
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2019-209.yaml
- nvd.nist.gov/vuln/detail/CVE-2019-16778
- github.com/tensorflow/tensorflow/blob/master/tensorflow/security/advisory/tfsa-2019-002.md 3rd Party
- github.com/tensorflow/tensorflow/commit/db4f9717c41bccc3ce10099ab61996b246099892 Patch
- github.com/tensorflow/tensorflow/security/advisories/GHSA-844w-j86r-4x2j Patch 3rd Party
Timeline
Related Vulnerabilities
CVE-2020-15196 9.9 TensorFlow: heap OOB read in sparse/ragged count ops
Same package: tensorflow CVE-2022-23587 9.8 TensorFlow: integer overflow in Grappler enables RCE
Same package: tensorflow CVE-2020-15208 9.8 TFLite: OOB read/write via tensor dimension mismatch
Same package: tensorflow CVE-2020-15205 9.8 TensorFlow: heap overflow in StringNGrams, ASLR bypass
Same package: tensorflow CVE-2022-35939 9.8 TensorFlow: ScatterNd OOB write enables RCE/crash
Same package: tensorflow