Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-29532

TensorFlow is an end-to-end open source platform for machine learning. An attacker can force accesses outside the bounds of heap allocated arrays by passing in invalid tensor values to `tf.raw_ops.RaggedCross`. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/efea03b38fb8d3b81762237dc85e579cc5fc6e87/tensorflow/core/kernels/ragged_cross_op.cc#L456-L487) lacks validation for the user supplied arguments. Each of the above branches call a helper function after accessing array elements via a `*_list[next_*]` pattern, followed by incrementing the `next_*` index. However, as there is no validation that the `next_*` values are in the valid range for the corresponding `*_list` arrays, this results in heap OOB reads. 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-29532
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 12:44 UTC · Revision 1

Source evidence

CVE-2021-29532

core-osv · Original source

Published 14 May 2021, 20:15 UTC

TensorFlow is an end-to-end open source platform for machine learning. An attacker can force accesses outside the bounds of heap allocated arrays by passing in invalid tensor values to `tf.raw_ops.RaggedCross`. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/efea03b38fb8d3b81762237dc85e579cc5fc6e87/tensorflow/core/kernels/ragged_cross_op.cc#L456-L487) lacks validation for the user supplied arguments. Each of the above branches call a helper function after accessing array elements via a `*_list[next_*]` pattern, followed by incrementing the `next_*` index. However, as there is no validation that the `next_*` values are in the valid range for the corresponding `*_list` arrays, this results in heap OOB reads. 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-29532
Complete source record
{
  "id": "23cc9b17515ab7276e406ad04c69dee36de930ef3422bf6e7b7ed6236e293b8d",
  "url": "https://osv.dev/vulnerability/CVE-2021-29532",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-29532",
    "summary": "TensorFlow is an end-to-end open source platform for machine learning. An attacker can force accesses outside the bounds of heap allocated arrays by passing in invalid tensor values to `tf.raw_ops.RaggedCross`. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/efea03b38fb8d3b81762237dc85e579cc5fc6e87/tensorflow/core/kernels/ragged_cross_op.cc#L456-L487) lacks validation for the user supplied arguments. Each of the above branches call a helper function after accessing array elements via a `*_list[next_*]` pattern, followed by incrementing the `next_*` index. However, as there is no validation that the `next_*` values are in the valid range for the corresponding `*_list` arrays, this results in heap OOB reads. 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-29532",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2021-29532",
      "aliases": [
        "BIT-tensorflow-2021-29532",
        "CVE-2021-29532",
        "GHSA-j47f-4232-hvv8",
        "PYSEC-2021-169",
        "PYSEC-2021-460",
        "PYSEC-2021-658"
      ],
      "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": "44b7f486c0143f68b56c34e2d01e146ee445134a"
                }
              ],
              "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": "44b7f486c0143f68b56c34e2d01e146ee445134a"
                      }
                    ],
                    "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-29532.json",
            "vanir_signatures": [
              {
                "id": "CVE-2021-29532-0526ac73",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "41923601570542091892861122558246015454",
                    "185825093596051970055352567945976532463",
                    "114041496570279427573156945057778240810",
                    "282044368558234215517261715195642705420",
                    "43473708984564396953017952267066164007",
                    "336088900727250390219629758968654370496",
                    "234046906352886307629515910872756944832",
                    "245997460144130800998832894035311965975",
                    "123443452042129516355772275987368747465",
                    "337915393771193782114785400427025183020",
                    "37883780838538775380773945674706809803",
                    "31830206729498690941770142802820942632",
                    "128008031022355263285195476410001788851",
                    "12710113139687672892683974275252351637",
                    "308678745473374905902006308322686428400",
                    "233685582531156277925984620447865364228",
                    "98446618186184040608556843355281796194",
                    "180879606178087360783741868442104778748"
                  ]
                },
                "source": "https://github.com/tensorflow/tensorflow/commit/44b7f486c0143f68b56c34e2d01e146ee445134a",
                "target": {
                  "file": "tensorflow/core/kernels/ragged_cross_op.cc"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T14:24:21Z"
          }
        }
      ],
      "modified": "2026-10-20T14:24:21.300677973Z",
      "provider": "osv",
      "references": [
        "https://github.com/tensorflow/tensorflow/commit/44b7f486c0143f68b56c34e2d01e146ee445134a",
        "https://github.com/tensorflow/tensorflow/security/advisories/GHSA-j47f-4232-hvv8"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-29532",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 388897,
  "published_at": "2021-05-14T20:15:12.073+00:00"
}