Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2020-5215

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2020-5215
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 12:42 UTC · Revision 1

Source evidence

CVE-2020-5215

core-osv · Original source

Published 28 Jan 2020, 22:15 UTC

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.

osv:CVE-2020-5215
Complete source record
{
  "id": "90b8df2a644094791f197fdecdf023b6d3ab8e31ccddf92bd7ba7cf51e001c4d",
  "url": "https://osv.dev/vulnerability/CVE-2020-5215",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2020-5215",
    "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.",
    "evidence": "osv:CVE-2020-5215",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2020-5215",
      "aliases": [
        "BIT-tensorflow-2020-5215",
        "CVE-2020-5215",
        "GHSA-977j-xj7q-2jr9",
        "PYSEC-2020-258",
        "PYSEC-2020-303",
        "PYSEC-2020-338"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/tensorflow/tensorflow",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "5d80e1e8e6ee999be7db39461e0e79c90403a2e4"
                },
                {
                  "introduced": "64c3d382cadf7bbe8e7e99884bede8284ff67f56"
                },
                {
                  "fixed": "765ac8d16eff6d6ff997ee73809b402d8b1194ae"
                },
                {
                  "fixed": "5ac1b9e24ff6afc465756edf845d2e9660bd34bf"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.15.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.0.0"
                      },
                      {
                        "fixed": "2.0.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "5ac1b9e24ff6afc465756edf845d2e9660bd34bf"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "5d80e1e8e6ee999be7db39461e0e79c90403a2e4"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v1.15.2"
                  },
                  {
                    "range": [
                      {
                        "fixed": "765ac8d16eff6d6ff997ee73809b402d8b1194ae"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v2.0.1"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.15.0",
            "v1.15.0-rc3",
            "v2.0.0",
            "v1.15.0-rc2",
            "v1.15.0-rc1",
            "v1.15.0-rc0",
            "v1.12.1",
            "v1.9.0-rc2",
            "v1.6.0-rc1",
            "v1.1.0-rc2",
            "v1.1.0-rc1",
            "0.6.0",
            "0.5.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2020-5215.json",
            "vanir_signatures": [
              {
                "id": "CVE-2020-5215-2f65c5a3",
                "digest": {
                  "length": 197,
                  "function_hash": "169491756718983370347084055710880462714"
                },
                "source": "https://github.com/tensorflow/tensorflow/commit/5ac1b9e24ff6afc465756edf845d2e9660bd34bf",
                "target": {
                  "file": "tensorflow/python/lib/core/py_seq_tensor.cc",
                  "function": "ConvertScalar"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2020-5215-70bbff2d",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "119012024491724556604652250412589718169",
                    "237227084576023376989014051074680974801",
                    "127566177985306014886603074453497343059",
                    "116588546924028476433853740919580845958",
                    "200310780600779847604580446371257406828",
                    "93847000498619289548619176079235354394",
                    "104728098562335909513484096576330912108",
                    "73580511139890308769548924948362082448",
                    "58755134879969402159314086113495162591",
                    "9782078360940547244209260823949964113",
                    "164903012443669345717525717526426447624",
                    "254678185138735732743511734996436577707",
                    "332647247333544024785163524307273215918",
                    "255155194401183043783334046810606200733",
                    "232073086853253169125897111846775267760",
                    "183393305189902931528184554552436493206",
                    "152724757845698408491708230683505312717",
                    "219291339362028777303626789895113802914",
                    "105828942998903279080020628777602769332",
                    "199727909102925344223063434899511144173",
                    "26399827076628370016006416902936540169",
                    "43022509404646861400778728583533690548",
                    "63041649477159712319227981472757723680",
                    "195346844910273332569700470053611296557",
                    "8234255108616865316216316139158996228",
                    "211856056156421887520781950332685458993",
                    "334659155275816189251059591308725044538",
                    "147324274740098563333871203261451651242",
                    "272207610044661392402039287934294524580",
                    "229578991987724368532720703638495430371",
                    "266435314610068178723968289032009692368",
                    "116198875169680943115303134323197043947",
                    "157902972047198089976027550065173686894",
                    "31856031216673019846028575765608803630",
                    "171638304929510274816999762728143559503"
                  ]
                },
                "source": "https://github.com/tensorflow/tensorflow/commit/5ac1b9e24ff6afc465756edf845d2e9660bd34bf",
                "target": {
                  "file": "tensorflow/python/lib/core/py_seq_tensor.cc"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2020-5215-87f0e17c",
                "digest": {
                  "length": 2731,
                  "function_hash": "210234051100349996838581020104485244505"
                },
                "source": "https://github.com/tensorflow/tensorflow/commit/5ac1b9e24ff6afc465756edf845d2e9660bd34bf",
                "target": {
                  "file": "tensorflow/python/lib/core/py_seq_tensor.cc",
                  "function": "PySeqToTensor"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2020-5215-fdc4c3c5",
                "digest": {
                  "length": 1174,
                  "function_hash": "224950308607699489243452055965469347570"
                },
                "source": "https://github.com/tensorflow/tensorflow/commit/5ac1b9e24ff6afc465756edf845d2e9660bd34bf",
                "target": {
                  "file": "tensorflow/python/lib/core/py_seq_tensor.cc",
                  "function": "ConvertOneFloat"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T14:14:08Z"
          }
        }
      ],
      "modified": "2026-10-20T14:14:08.228115545Z",
      "provider": "osv",
      "references": [
        "https://github.com/tensorflow/tensorflow/releases/tag/v1.15.2",
        "https://github.com/tensorflow/tensorflow/releases/tag/v2.0.1",
        "https://github.com/tensorflow/tensorflow/commit/5ac1b9e24ff6afc465756edf845d2e9660bd34bf",
        "https://github.com/tensorflow/tensorflow/security/advisories/GHSA-977j-xj7q-2jr9"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2020-5215",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 388748,
  "published_at": "2020-01-28T22:15:11.09+00:00"
}