CVE-2020-5215
HIGH 7.5CVSS 3.1Segmentation faultin TensorFlow when converting a Python string to `tf.float16`
In TensorFlow before 1.15.2 and 2.0.1, converting a string (from Python) to a tf.float16 value results in a segmentation fault in eager mode as the format checks for this use case are only in the graph mode. This issue can lead to denial of service in inference/training where a malicious attacker can send a data point which contains a string instead of a tf.float16 value. Similar effects can be obtained by manipulating saved models and checkpoints whereby replacing a scalar tf.float16 value with a scalar string will trigger this issue due to automatic conversions. This can be easily reproduced by tf.constant("hello", tf.float16), if eager execution is enabled. This issue is patched in TensorFlow 1.15.1 and 2.0.1 with this vulnerability patched. TensorFlow 2.1.0 was released after we fixed the issue, thus it is not affected. Users are encouraged to switch to TensorFlow 1.15.1, 2.0.1 or 2.1.0.
- Published
- 28 Jan 2020
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-20CWE-754
- Also known as
- BIT-tensorflow-2020-5215GHSA-977j-xj7q-2jr9PYSEC-2020-258PYSEC-2020-303PYSEC-2020-338
- Sources
- NVDJSONOSV GHSA-977j-xj7q-2jr9JSONOSV PYSEC-2020-258JSONOSV PYSEC-2020-303JSONOSV PYSEC-2020-338JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:L/VI:L/VA:L/SC:L/SI:L/SA:L | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 5.0 | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.0 | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 4.3 | AV:N/AC:M/Au:N/C:N/I:N/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | tensorflowcpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:* |
< 1.15.2 | 1.15.2 | |
| NVD | tensorflowcpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:* |
>= 2.0.0, < 2.0.1 | 2.0.1 | |
| OSV | PyPI | tensorflow | < 1.15.2 | 1.15.2 |
| OSV | PyPI | tensorflow | >= 2.0.0, < 2.0.1 | 2.0.1 |
| OSV | PyPI | tensorflow-cpu | < 1.15.2 | 1.15.2 |
| OSV | PyPI | tensorflow-cpu | >= 2.0.0, < 2.0.1 | 2.0.1 |
| OSV | PyPI | tensorflow-gpu | < 1.15.2 | 1.15.2 |
| OSV | PyPI | tensorflow-gpu | >= 2.0.0, < 2.0.1 | 2.0.1 |
| OSV | PyPI | tensorflow | < 1.15.2; >= 2.0.0, < 2.0.1 | 1.15.2, 2.0.1 |
| OSV | PyPI | tensorflow-cpu | < 1.15.2; >= 2.0.0, < 2.0.1 | 1.15.2, 2.0.1 |
| OSV | PyPI | tensorflow-gpu | < 1.15.2; >= 2.0.0, < 2.0.1 | 1.15.2, 2.0.1 |
References
- https://github.com/tensorflow/tensorflow/commit/5ac1b9e24ff6afc465756edf845d2e9660bd34bf · Patch, WEB, FIX
- https://github.com/tensorflow/tensorflow/releases/tag/v1.15.2 · Release Notes, WEB
- https://github.com/tensorflow/tensorflow/releases/tag/v2.0.1 · Release Notes, WEB
- https://github.com/tensorflow/tensorflow/security/advisories/GHSA-977j-xj7q-2jr9 · Exploit, Patch, Third Party Advisory, WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2020-5215 · ADVISORY
- https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2020-303.yaml · WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2020-338.yaml · WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2020-258.yaml · WEB
- https://github.com/tensorflow/tensorflow · PACKAGE
History
- 25 Nov 2026 20:31 UTC · NVD: first stored (published 28 Jan 2020)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 28 Jan 2020)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 28 Jan 2020)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 28 Jan 2020)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 28 Jan 2020)