Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2020-15214

In TensorFlow Lite before versions 2.2.1 and 2.3.1, models using segment sum can trigger a write out bounds / segmentation fault if the segment ids are not sorted. Code assumes that the segment ids are in increasing order, using the last element of the tensor holding them to determine the dimensionality of output tensor. This results in allocating insufficient memory for the output tensor and in a write outside the bounds of the output array. This usually results in a segmentation fault, but depending on runtime conditions it can provide for a write gadget to be used in future memory corruption-based exploits. The issue is patched in commit 204945b19e44b57906c9344c0d00120eeeae178a and is released in TensorFlow versions 2.2.1, or 2.3.1. A potential workaround would be to add a custom `Verifier` to the model loading code to ensure that the segment ids are sorted, although this only handles the case when the segment ids are stored statically in the model. A similar validation could be done if the segment ids are generated at runtime between inference steps. If the segment ids are generated as outputs of a tensor during inference steps, then there are no possible workaround and users are advised to upgrade to patched code.

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

Source evidence

CVE-2020-15214

core-osv · Original source

Published 25 Sept 2020, 19:15 UTC

In TensorFlow Lite before versions 2.2.1 and 2.3.1, models using segment sum can trigger a write out bounds / segmentation fault if the segment ids are not sorted. Code assumes that the segment ids are in increasing order, using the last element of the tensor holding them to determine the dimensionality of output tensor. This results in allocating insufficient memory for the output tensor and in a write outside the bounds of the output array. This usually results in a segmentation fault, but depending on runtime conditions it can provide for a write gadget to be used in future memory corruption-based exploits. The issue is patched in commit 204945b19e44b57906c9344c0d00120eeeae178a and is released in TensorFlow versions 2.2.1, or 2.3.1. A potential workaround would be to add a custom `Verifier` to the model loading code to ensure that the segment ids are sorted, although this only handles the case when the segment ids are stored statically in the model. A similar validation could be done if the segment ids are generated at runtime between inference steps. If the segment ids are generated as outputs of a tensor during inference steps, then there are no possible workaround and users are advised to upgrade to patched code.

osv:CVE-2020-15214
Complete source record
{
  "id": "e755dd8c7043176c20b1d8637b203ccc7d3f039d5a973aa57ebba9091e9ff871",
  "url": "https://osv.dev/vulnerability/CVE-2020-15214",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2020-15214",
    "summary": "In TensorFlow Lite before versions 2.2.1 and 2.3.1, models using segment sum can trigger a write out bounds / segmentation fault if the segment ids are not sorted. Code assumes that the segment ids are in increasing order, using the last element of the tensor holding them to determine the dimensionality of output tensor. This results in allocating insufficient memory for the output tensor and in a write outside the bounds of the output array. This usually results in a segmentation fault, but depending on runtime conditions it can provide for a write gadget to be used in future memory corruption-based exploits. The issue is patched in commit 204945b19e44b57906c9344c0d00120eeeae178a and is released in TensorFlow versions 2.2.1, or 2.3.1. A potential workaround would be to add a custom `Verifier` to the model loading code to ensure that the segment ids are sorted, although this only handles the case when the segment ids are stored statically in the model. A similar validation could be done if the segment ids are generated at runtime between inference steps. If the segment ids are generated as outputs of a tensor during inference steps, then there are no possible workaround and users are advised to upgrade to patched code.",
    "evidence": "osv:CVE-2020-15214",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2020-15214",
      "aliases": [
        "BIT-tensorflow-2020-15214",
        "CVE-2020-15214",
        "GHSA-p2cq-cprg-frvm",
        "PYSEC-2020-137",
        "PYSEC-2020-294",
        "PYSEC-2020-329"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/tensorflow/tensorflow",
              "type": "GIT",
              "events": [
                {
                  "introduced": "2b96f3662bd776e277f86997659e61046b56c315"
                },
                {
                  "fixed": "25fba035f3e453d94490932096282c7b0624bbb3"
                },
                {
                  "introduced": "b36436b087bd8e8701ef51718179037cccdfc26e"
                },
                {
                  "fixed": "fcc4b966f1265f466e82617020af93670141b009"
                },
                {
                  "fixed": "204945b19e44b57906c9344c0d00120eeeae178a"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:google:tensorflow:*:*:*:*:lite:*:*:*",
                    "range": [
                      {
                        "introduced": "2.2.0"
                      },
                      {
                        "fixed": "2.2.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:google:tensorflow:*:*:*:*:lite:*:*:*",
                    "range": [
                      {
                        "introduced": "2.3.0"
                      },
                      {
                        "fixed": "2.3.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "204945b19e44b57906c9344c0d00120eeeae178a"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "fcc4b966f1265f466e82617020af93670141b009"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v2.3.1"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v2.2.0",
            "v2.3.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2020-15214.json",
            "vanir_signatures": [
              {
                "id": "CVE-2020-15214-52684639",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "101972797124021689281987725340951420668",
                    "201683876355472291189114228165797820445",
                    "211115368128421790584663460110504110559",
                    "217680514074416056930436943335463050468",
                    "98672107064172366153370090508856490407",
                    "312365468975337318428306797459355296745",
                    "109769402466749519282006345627816395581",
                    "270271510250316633290731012697965599223"
                  ]
                },
                "source": "https://github.com/tensorflow/tensorflow/commit/204945b19e44b57906c9344c0d00120eeeae178a",
                "target": {
                  "file": "tensorflow/lite/kernels/segment_sum.cc"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2020-15214-83df9c7c",
                "digest": {
                  "length": 499,
                  "function_hash": "42158381662736317977731229140612748319"
                },
                "source": "https://github.com/tensorflow/tensorflow/commit/204945b19e44b57906c9344c0d00120eeeae178a",
                "target": {
                  "file": "tensorflow/lite/kernels/segment_sum.cc",
                  "function": "ResizeOutputTensor"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2020-15214-bc1e6078",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "22287067125757028589139043166053555711",
                    "37653588271508662778708658918209771606"
                  ]
                },
                "source": "https://github.com/tensorflow/tensorflow/commit/204945b19e44b57906c9344c0d00120eeeae178a",
                "target": {
                  "file": "tensorflow/lite/kernels/segment_sum_test.cc"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T14:10:42Z"
          }
        }
      ],
      "modified": "2026-10-20T14:10:42.806228966Z",
      "provider": "osv",
      "references": [
        "https://github.com/tensorflow/tensorflow/releases/tag/v2.3.1",
        "https://github.com/tensorflow/tensorflow/commit/204945b19e44b57906c9344c0d00120eeeae178a",
        "https://github.com/tensorflow/tensorflow/security/advisories/GHSA-p2cq-cprg-frvm"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2020-15214",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 388641,
  "published_at": "2020-09-25T19:15:16.713+00:00"
}