{"id":"CVE-2020-15200","aliases":["CVE-2020-15200","GHSA-x7rp-74x2-mjf3","BIT-TENSORFLOW-2020-15200","PYSEC-2020-123","PYSEC-2020-280","PYSEC-2020-315"],"related":[],"kind":"vulnerability","state":"published","title":"Segfault in Tensorflow","summary":"In Tensorflow before version 2.3.1, the `RaggedCountSparseOutput` implementation does not validate that the input arguments form a valid ragged tensor. In particular, there is no validation that the values in the `splits` tensor generate a valid partitioning of the `values` tensor. Thus, the code sets up conditions to cause a heap buffer overflow. A `BatchedMap` is equivalent to a vector where each element is a hashmap. However, if the first element of `splits_values` is not 0, `batch_idx` will never be 1, hence there will be no hashmap at index 0 in `per_batch_counts`. Trying to access that in the user code results in a segmentation fault. The issue is patched in commit 3cbb917b4714766030b28eba9fb41bb97ce9ee02 and is released in TensorFlow version 2.3.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In Tensorflow before version 2.3.1, the `RaggedCountSparseOutput` implementation does not validate that the input arguments form a valid ragged tensor. In particular, there is no validation that the values in the `splits` tensor generate a valid partitioning of the `values` tensor. Thus, the code sets up conditions to cause a heap buffer overflow. A `BatchedMap` is equivalent to a vector where each element is a hashmap. However, if the first element of `splits_values` is not 0, `batch_idx` will never be 1, hence there will be no hashmap at index 0 in `per_batch_counts`. Trying to access that in the user code results in a segmentation fault. The issue is patched in commit 3cbb917b4714766030b28eba9fb41bb97ce9ee02 and is released in TensorFlow version 2.3.1.","source":"cvelist"},{"lang":"en","text":"### Impact\nThe `RaggedCountSparseOutput` implementation does not validate that the input arguments form a valid ragged tensor. In particular, there is no validation that the values in the `splits` tensor generate a valid partitioning of the `values` tensor. Thus, the [following code](https://github.com/tensorflow/tensorflow/blob/0e68f4d3295eb0281a517c3662f6698992b7b2cf/tensorflow/core/kernels/count_ops.cc#L248-L265\n) sets up conditions to cause a heap buffer overflow:\n```cc\n    auto per_batch_counts = BatchedMap<W>(num_batches);\n    int batch_idx = 0;\n    for (int idx = 0; idx < num_values; ++idx) {\n      while (idx >= splits_values(batch_idx)) {\n        batch_idx++;\n      }\n      const auto& value = values_values(idx);\n      if (value >= 0 && (maxlength_ <= 0 || value < maxlength_)) {\n        per_batch_counts[batch_idx - 1][value] = 1;\n      }\n    }\n```\n\nA `BatchedMap` is equivalent to a vector where each element is a hashmap. However, if the first element of `splits_values` is not 0, `batch_idx` will never be 1, hence there will be no hashmap at index 0 in `per_batch_counts`. Trying to access that in the user code results in a segmentation fault.\n\n### Patches\nWe have patched the issue in 3cbb917b4714766030b28eba9fb41bb97ce9ee02 and will release a patch release.\n\nWe recommend users to upgrade to TensorFlow 2.3.1.\n\n### For more information\nPlease consult [our security guide](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md) for more information regarding the security model and how to contact us with issues and questions.\n\n### Attribution\nThis vulnerability is a variant of [GHSA-p5f8-gfw5-33w4](https://github.com/tensorflow/tensorflow/security/advisories/GHSA-p5f8-gfw5-33w4)","format":"markdown","source":"ghsa"},{"lang":"es","text":"En Tensorflow anteriores a la versión 2.3.1, la implementación de \"RaggedCountSparseOutput\" no comprueba que los argumentos de entrada formen un tensor irregular válido.&#xa0;En particular, no existe comprobación de que los valores en el tensor \"splits\" generen una partición válida del tensor \"values\".&#xa0;Por lo tanto, el código establece las condiciones para causar un desbordamiento del búfer de la pila.&#xa0;Un \"BatchedMap\" es equivalente a un vector donde cada elemento es un mapa de hash.&#xa0;Sin embargo, si el primer elemento de \"splits_values\" no es 0, \"batch_idx\" nunca será 1, por lo que no habrá un hashmap en el índice 0 en \"per_batch_counts\".&#xa0;Intentar acceder a eso en el código de usuario resulta en un fallo de segmentación.&#xa0;El problema es parcheado en el commit 3cbb917b4714766030b28eba9fb41bb97ce9ee02 y es publicado en TensorFlow versión 2.3.1","source":"nvd"}],"published":"2020-09-25T18:28:32.000Z","modified":"2026-09-08T08:48:19.897Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.9,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.9,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:N/I:N/A:P","score":4.3,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-20","CWE-122","CWE-787"],"affected":[{"ranges":[{"version":"= 2.3.0","status":"affected"}],"vendor":"tensorflow","product":"tensorflow","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2.3.0","status":"affected","fixed":"2.3.1"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.3.0","status":"affected","fixed":"2.3.1"}],"ecosystem":"PyPI","package":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.3.0","status":"affected","fixed":"2.3.1"}],"ecosystem":"PyPI","package":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","source":"ghsa"},{"ranges":[{"status":"affected","version":"2.3.0"}],"vendor":"google","product":"tensorflow","cpe":"cpe:2.3:a:google:tensorflow:2.3.0:*:*:*:-:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"3cbb917b4714766030b28eba9fb41bb97ce9ee02"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.3.1"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","repo":"https://github.com/tensorflow/tensorflow","source":"pysec"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"3cbb917b4714766030b28eba9fb41bb97ce9ee02"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.3.1"}],"ecosystem":"PyPI","package":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","repo":"https://github.com/tensorflow/tensorflow","source":"pysec"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"3cbb917b4714766030b28eba9fb41bb97ce9ee02"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.3.1"}],"ecosystem":"PyPI","package":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","repo":"https://github.com/tensorflow/tensorflow","source":"pysec"},{"ranges":[{"type":"semver","introduced":"2.3.0","status":"affected","fixed":"2.3.1"}],"ecosystem":"Bitnami","package":"tensorflow","purl":"pkg:bitnami/tensorflow","source":"bitnami"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.3.1","tags":["advisory","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-x7rp-74x2-mjf3","tags":["advisory","exploit","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow/commit/3cbb917b4714766030b28eba9fb41bb97ce9ee02","tags":["advisory","fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-15200","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2020-280.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2020-315.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2020-123.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/tensorflow/tensorflow","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2020-15200","url":"https://www.cve.org/CVERecord?id=CVE-2020-15200","licence":"CVE Terms of Use","modified":"2024-08-04T13:08:22.775Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x7rp-74x2-mjf3","url":"https://github.com/advisories/GHSA-x7rp-74x2-mjf3","licence":"CC-BY-4.0","modified":"2026-07-08T06:28:16.173Z"},{"source":"nvd","name":"NVD","id":"CVE-2020-15200","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-15200","licence":"Public domain","modified":"2026-06-17T02:56:15.107Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2020-123","url":"https://osv.dev/vulnerability/PYSEC-2020-123","licence":"CC-BY-4.0","modified":"2023-12-06T01:00:16.638Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2020-280","url":"https://osv.dev/vulnerability/PYSEC-2020-280","licence":"CC-BY-4.0","modified":"2023-12-06T01:00:16.638Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2020-315","url":"https://osv.dev/vulnerability/PYSEC-2020-315","licence":"CC-BY-4.0","modified":"2023-12-06T01:00:16.638Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-TENSORFLOW-2020-15200","url":"https://osv.dev/vulnerability/BIT-TENSORFLOW-2020-15200","licence":"Apache-2.0","modified":"2026-09-08T08:48:19.897Z"}],"updatedAt":"2026-11-25T22:57:54.950Z","epss":{"score":0.00851,"percentile":0.55724,"date":"2026-11-30T12:00:22.000Z"}}