Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-29590

TensorFlow is an end-to-end open source platform for machine learning. The implementations of the `Minimum` and `Maximum` TFLite operators can be used to read data outside of bounds of heap allocated objects, if any of the two input tensor arguments are empty. This is because the broadcasting implementation(https://github.com/tensorflow/tensorflow/blob/0d45ea1ca641b21b73bcf9c00e0179cda284e7e7/tensorflow/lite/kernels/internal/reference/maximum_minimum.h#L52-L56) indexes in both tensors with the same index but does not validate that the index is within bounds. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.

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

Source evidence

CVE-2021-29590

core-osv · Original source

Published 14 May 2021, 20:15 UTC

TensorFlow is an end-to-end open source platform for machine learning. The implementations of the `Minimum` and `Maximum` TFLite operators can be used to read data outside of bounds of heap allocated objects, if any of the two input tensor arguments are empty. This is because the broadcasting implementation(https://github.com/tensorflow/tensorflow/blob/0d45ea1ca641b21b73bcf9c00e0179cda284e7e7/tensorflow/lite/kernels/internal/reference/maximum_minimum.h#L52-L56) indexes in both tensors with the same index but does not validate that the index is within bounds. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.

osv:CVE-2021-29590
Complete source record
{
  "id": "2596208c3605872d6ce844d24f04268777b6ce3311459d9ca35bbae5242de3ac",
  "url": "https://osv.dev/vulnerability/CVE-2021-29590",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-29590",
    "summary": "TensorFlow is an end-to-end open source platform for machine learning. The implementations of the `Minimum` and `Maximum` TFLite operators can be used to read data outside of bounds of heap allocated objects, if any of the two input tensor arguments are empty. This is because the broadcasting implementation(https://github.com/tensorflow/tensorflow/blob/0d45ea1ca641b21b73bcf9c00e0179cda284e7e7/tensorflow/lite/kernels/internal/reference/maximum_minimum.h#L52-L56) indexes in both tensors with the same index but does not validate that the index is within bounds. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.",
    "evidence": "osv:CVE-2021-29590",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2021-29590",
      "aliases": [
        "BIT-tensorflow-2021-29590",
        "CVE-2021-29590",
        "GHSA-24x6-8c7m-hv3f",
        "PYSEC-2021-227",
        "PYSEC-2021-518",
        "PYSEC-2021-716"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/tensorflow/tensorflow",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "0931ea3d985bb9c8fdd054a5e29c4129623c849b"
                },
                {
                  "introduced": "2b96f3662bd776e277f86997659e61046b56c315"
                },
                {
                  "fixed": "cfe0c80169ae984bcdc99ff6de7444164aaa8e07"
                },
                {
                  "introduced": "b36436b087bd8e8701ef51718179037cccdfc26e"
                },
                {
                  "fixed": "3929ffacfbef7c431e8397920d040aaf47acff19"
                },
                {
                  "introduced": "582c8d236cb079023657287c318ff26adb239002"
                },
                {
                  "fixed": "1923123d32ea41d92b70a27a3f6ecf0763b56f6c"
                },
                {
                  "fixed": "953f28dca13c92839ba389c055587cfe6c723578"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.1.4"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.2.0"
                      },
                      {
                        "fixed": "2.2.3"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.3.0"
                      },
                      {
                        "fixed": "2.3.3"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.4.0"
                      },
                      {
                        "fixed": "2.4.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "953f28dca13c92839ba389c055587cfe6c723578"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v2.1.3",
            "v2.2.2",
            "v2.3.2",
            "v2.4.1",
            "v2.1.2",
            "v2.2.1",
            "v2.4.0",
            "v2.3.1",
            "v2.2.0",
            "v2.1.1",
            "v2.3.0",
            "v2.1.0",
            "v2.1.0-rc0",
            "v2.1.0-rc2",
            "v2.1.0-rc1",
            "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-2021-29590.json",
            "vanir_signatures": [
              {
                "id": "CVE-2021-29590-08b94427",
                "digest": {
                  "length": 958,
                  "function_hash": "143412123912455264663608809151831093344"
                },
                "source": "https://github.com/tensorflow/tensorflow/commit/953f28dca13c92839ba389c055587cfe6c723578",
                "target": {
                  "file": "tensorflow/lite/kernels/maximum_minimum.cc",
                  "function": "Eval"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-29590-0e6815b7",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "39244024713851153351262884514975860863",
                    "224418735901351779264656680599679941748",
                    "44339197692612372189136787257550184650",
                    "138381670592687995144185521708626781965",
                    "72788690512051041611674551682146583917",
                    "279750234690175654019368978465250324299",
                    "194881455884626535768423190186140899505",
                    "98430208511938845301117750859567673010",
                    "182429477980018974440910036493196425000",
                    "160288132734454143094912329524102652100",
                    "90541029483050202489981472606865318918",
                    "257258417156141188088118956415911511438",
                    "216093153087568857212274175128589751237",
                    "197181921748731750942888662726553906421",
                    "311871849290014078600613550940633406866",
                    "317442913911818280385321933765808819907",
                    "164172749325866949936440478037839185851",
                    "126460276190493712690364568101209049238",
                    "325980224761891105666686415461085429438",
                    "125117740751978891254930233132854482763",
                    "242918789214341178317955391420328224488",
                    "281137148844844488730518216947169012293",
                    "66240646413582546969384995263104636293",
                    "161016618355986117801888397858478605319",
                    "330670412889800202072117640382251010524",
                    "81493701324848453097787181373407214223",
                    "143962493487342097639722869316406900456",
                    "126763964812436759535330943396989401255",
                    "128038701972131308597646962193754022402",
                    "21441018988888641118882625680859000107",
                    "179891618319963547923629871749153938684",
                    "194723390917787130513253012618565048323"
                  ]
                },
                "source": "https://github.com/tensorflow/tensorflow/commit/953f28dca13c92839ba389c055587cfe6c723578",
                "target": {
                  "file": "tensorflow/lite/kernels/maximum_minimum.cc"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T14:24:36Z"
          }
        }
      ],
      "modified": "2026-10-20T14:24:36.030293655Z",
      "provider": "osv",
      "references": [
        "https://github.com/tensorflow/tensorflow/commit/953f28dca13c92839ba389c055587cfe6c723578",
        "https://github.com/tensorflow/tensorflow/security/advisories/GHSA-24x6-8c7m-hv3f"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-29590",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 388940,
  "published_at": "2021-05-14T20:15:14.817+00:00"
}