{"id":"CVE-2020-15213","aliases":["CVE-2020-15213","GHSA-hjmq-236j-8m87","BIT-TENSORFLOW-2020-15213","PYSEC-2020-136","PYSEC-2020-293","PYSEC-2020-328"],"related":[],"kind":"vulnerability","state":"published","title":"Denial of service in tensorflow-lite","summary":"In TensorFlow Lite before versions 2.2.1 and 2.3.1, models using segment sum can trigger a denial of service by causing an out of memory allocation in the implementation of segment sum. Since code uses the last element of the tensor holding them to determine the dimensionality of output tensor, attackers can use a very large value to trigger a large allocation. 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 limit the maximum value in the segment ids tensor. This only handles the case when the segment ids are stored statically in the model, but a similar validation could be done if the segment ids are generated at runtime, between inference steps. However, 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In TensorFlow Lite before versions 2.2.1 and 2.3.1, models using segment sum can trigger a denial of service by causing an out of memory allocation in the implementation of segment sum. Since code uses the last element of the tensor holding them to determine the dimensionality of output tensor, attackers can use a very large value to trigger a large allocation. 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 limit the maximum value in the segment ids tensor. This only handles the case when the segment ids are stored statically in the model, but a similar validation could be done if the segment ids are generated at runtime, between inference steps. However, 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.","source":"cvelist"},{"lang":"en","text":"### Impact\nIn TensorFlow Lite models using segment sum can trigger a denial of service by causing an out of memory allocation in the implementation of segment sum. Since code uses the last element of the tensor holding them to determine the dimensionality of output tensor, attackers can use a very large value to trigger a large allocation:\nhttps://github.com/tensorflow/tensorflow/blob/0e68f4d3295eb0281a517c3662f6698992b7b2cf/tensorflow/lite/kernels/segment_sum.cc#L39-L44\n\n### Patches\nWe have patched the issue in 204945b and will release patch releases for all affected versions.\n\nWe recommend users to upgrade to TensorFlow 2.2.1, or 2.3.1.\n\n### Workarounds\nA potential workaround would be to add a custom `Verifier` to limit the maximum value in the segment ids tensor. This only handles the case when the segment ids are stored statically in the model, but a similar validation could be done if the segment ids are generated at runtime, between inference steps.\n\nHowever, 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.\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 has been discovered from a variant analysis of [GHSA-p2cq-cprg-frvm](https://github.com/tensorflow/tensorflow/security/advisories/GHSA-p2cq-cprg-frvm).","format":"markdown","source":"ghsa"},{"lang":"es","text":"En TensorFlow Lite versiones anteriores a 2.2.1 y 2.3.1, los modelos que utilizan la suma de segmentos pueden desencadenar una denegación de servicio al causar una asignación de memoria insuficiente en la implementación de la suma de segmentos. Dado que el código usa el último elemento del tensor que los conserva para determinar la dimensionalidad del tensor de salida, los atacantes pueden usar un valor muy grande para desencadenar una gran asignación. El problema es parcheado en el commit 204945b19e44b57906c9344c0d00120eeeae178a y es publicado en TensorFlow versiones 2.2.1 o 2.3.1. Una solución alternativa potencial sería agregar un \"Verifier\" personalizado para limitar el valor máximo en el tensor de los ids de segmento. Esto solo maneja el caso cuando los ids de segmento son almacenados estáticamente en el modelo, pero se podría realizar una comprobación similar si los ids de segmento son generados en el tiempo de ejecución, entre los pasos de inferencia. Sin embargo, si los ids de segmento son generados como salidas de un tensor durante los pasos de inferencia, entonces no existe una solución posible y se recomienda a los usuarios actualizar al código parcheado","source":"nvd"}],"published":"2020-09-25T18:28:53.000Z","modified":"2026-09-08T08:48:19.895Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:L","score":4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:L","score":4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:L","score":4,"rating":"MEDIUM"},{"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:L/SC:N/SI:N/SA:L","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:L","score":4,"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-119","CWE-770"],"affected":[{"ranges":[{"version":"= 2.2.0","status":"affected"},{"version":"= 2.3.0","status":"affected"}],"vendor":"tensorflow","product":"tensorflow","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2.2.0","status":"affected","fixed":"2.2.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","purl":"pkg:pypi/tensorflow","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.2.0","status":"affected","fixed":"2.2.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-cpu","purl":"pkg:pypi/tensorflow-cpu","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.2.0","status":"affected","fixed":"2.2.1"}],"ecosystem":"PyPI","package":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","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","introduced":"2.2.0","fixed":"2.2.1"},{"status":"affected","introduced":"2.3.0","fixed":"2.3.1"}],"vendor":"google","product":"tensorflow","cpe":"cpe:2.3:a:google:tensorflow:*:*:*:*:lite:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"204945b19e44b57906c9344c0d00120eeeae178a"},{"type":"ecosystem","introduced":"2.2.0","status":"affected","fixed":"2.2.1"},{"type":"ecosystem","introduced":"2.3.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":"204945b19e44b57906c9344c0d00120eeeae178a"},{"type":"ecosystem","introduced":"2.2.0","status":"affected","fixed":"2.2.1"},{"type":"ecosystem","introduced":"2.3.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":"204945b19e44b57906c9344c0d00120eeeae178a"},{"type":"ecosystem","introduced":"2.2.0","status":"affected","fixed":"2.2.1"},{"type":"ecosystem","introduced":"2.3.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.2.0","status":"affected","fixed":"2.2.1"},{"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/commit/204945b19e44b57906c9344c0d00120eeeae178a","tags":["advisory","fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-hjmq-236j-8m87","tags":["advisory","exploit","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-15213","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow/commit/00c7ed7ce81c2126ebc17dfe7073b5c0efd5ec0a","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/tensorflow/tensorflow/commit/a4030d8ba3692c438997c27be2dd95f3d5f54827","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2020-293.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2020-328.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2020-136.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/tensorflow/tensorflow","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/tensorflow/tensorflow/blob/0e68f4d3295eb0281a517c3662f6698992b7b2cf/tensorflow/lite/kernels/segment_sum.cc#L39-L44","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2020-15213","url":"https://www.cve.org/CVERecord?id=CVE-2020-15213","licence":"CVE Terms of Use","modified":"2024-08-04T13:08:22.853Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hjmq-236j-8m87","url":"https://github.com/advisories/GHSA-hjmq-236j-8m87","licence":"CC-BY-4.0","modified":"2026-07-08T06:28:11.675Z"},{"source":"nvd","name":"NVD","id":"CVE-2020-15213","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-15213","licence":"Public domain","modified":"2026-06-17T02:56:16.920Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2020-136","url":"https://osv.dev/vulnerability/PYSEC-2020-136","licence":"CC-BY-4.0","modified":"2023-12-06T01:00:17.426Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2020-293","url":"https://osv.dev/vulnerability/PYSEC-2020-293","licence":"CC-BY-4.0","modified":"2023-12-06T01:00:17.426Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2020-328","url":"https://osv.dev/vulnerability/PYSEC-2020-328","licence":"CC-BY-4.0","modified":"2023-12-06T01:00:17.426Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-TENSORFLOW-2020-15213","url":"https://osv.dev/vulnerability/BIT-TENSORFLOW-2020-15213","licence":"Apache-2.0","modified":"2026-09-08T08:48:19.895Z"}],"updatedAt":"2026-11-25T22:57:54.960Z","epss":{"score":0.0076,"percentile":0.56536,"date":"2026-12-02T12:00:21.000Z"}}