CVE-2020-5215 json
Segmentation faultin TensorFlow when converting a Python string to tf.float16
published 6y ago modified last mo. also BIT-tensorflow-2020-5215 , EUVD-2020-0219 , GHSA-977j-xj7q-2jr9 , PYSEC-2020-258 , PYSEC-2020-303 , PYSEC-2020-338
- cvss
- 5.0
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.6%
- EPSS 0.6% chance of exploitation in 30 days, percentile 48%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi tensorflow 1.15.2, 2.0.1
- pypi tensorflow-cpu 1.15.2, 2.0.1
- pypi tensorflow-gpu 1.15.2, 2.0.1
- bitnami tensorflow 1.15.2, 2.0.1
- google tensorflow 1.15.2, 2.0.1
Is CVE-2020-5215 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerExploit prediction
0.59% chance of exploitation in the next 30 days, higher than 48% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- github.com https://github.com/tensorflow/tensorflow/security/advisories/GHSA-977j-xj7q-2jr9 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.0 | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L |
| GitHub | 3.1 | 5.0 | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 2.0 | 4.3 | AV:N/AC:M/Au:N/C:N/I:N/A:P |
| OSV | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | tensorflow | <1.15.2 >=2.0.0, <2.0.1 |
1.15.2 2.0.1 |
| pypi | tensorflow-cpu | <1.15.2 >=2.0.0, <2.0.1 |
1.15.2 2.0.1 |
| pypi | tensorflow-gpu | <1.15.2 >=2.0.0, <2.0.1 |
1.15.2 2.0.1 |
| bitnami | tensorflow | <1.15.2 >=2.0.0, <2.0.1 |
1.15.2 2.0.1 |
Affected products
- TensorFlow TensorFlow
Classification
References
-
github.com
/tensorflow/tensorflow/commit/5ac1b9e24ff6afc465756edf845d2e9660bd34bf
web, patch
-
github.com
/tensorflow/tensorflow/security/advisories/GHSA-977j-xj7q-2jr9
web, exploit, patch, third-party-advisory, advisory
-
github.com
/tensorflow/tensorflow/releases/tag/v1.15.2
web, release-notes, article
-
github.com
/tensorflow/tensorflow/releases/tag/v2.0.1
web, release-notes, article
-
nvd.nist.gov
/vuln/detail/CVE-2020-5215
advisory, web
-
github.com
/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2020-303.yaml
web
-
github.com
/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2020-338.yaml
web
-
github.com
/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2020-258.yaml
web
-
github.com
/tensorflow/tensorflow
package
Sources
- CVE List CVE-2020-5215
- GitHub Advisory GHSA-977j-xj7q-2jr9
- NVD CVE-2020-5215
- OSV BIT-tensorflow-2020-5215
- OSV PYSEC-2020-258
- OSV PYSEC-2020-303
- OSV PYSEC-2020-338
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.