Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-41201

TensorFlow is an open source platform for machine learning. In affeced versions during execution, `EinsumHelper::ParseEquation()` is supposed to set the flags in `input_has_ellipsis` vector and `*output_has_ellipsis` boolean to indicate whether there is ellipsis in the corresponding inputs and output. However, the code only changes these flags to `true` and never assigns `false`. This results in unitialized variable access if callers assume that `EinsumHelper::ParseEquation()` always sets these flags. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.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-41201
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 12:38 UTC · Revision 1

Source evidence

CVE-2021-41201

core-osv · Original source

Published 5 Nov 2021, 20:15 UTC

TensorFlow is an open source platform for machine learning. In affeced versions during execution, `EinsumHelper::ParseEquation()` is supposed to set the flags in `input_has_ellipsis` vector and `*output_has_ellipsis` boolean to indicate whether there is ellipsis in the corresponding inputs and output. However, the code only changes these flags to `true` and never assigns `false`. This results in unitialized variable access if callers assume that `EinsumHelper::ParseEquation()` always sets these flags. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.

osv:CVE-2021-41201
Complete source record
{
  "id": "81fae524cbdb02d75f6462408c4d3cf534f5cc004676dea67d1d53df64e714da",
  "url": "https://osv.dev/vulnerability/CVE-2021-41201",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-41201",
    "summary": "TensorFlow is an open source platform for machine learning. In affeced versions during execution, `EinsumHelper::ParseEquation()` is supposed to set the flags in `input_has_ellipsis` vector and `*output_has_ellipsis` boolean to indicate whether there is ellipsis in the corresponding inputs and output. However, the code only changes these flags to `true` and never assigns `false`. This results in unitialized variable access if callers assume that `EinsumHelper::ParseEquation()` always sets these flags. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.",
    "evidence": "osv:CVE-2021-41201",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2021-41201",
      "aliases": [
        "BIT-tensorflow-2021-41201",
        "CVE-2021-41201",
        "GHSA-j86v-p27c-73fm",
        "PYSEC-2021-394",
        "PYSEC-2021-611",
        "PYSEC-2021-809"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/tensorflow/tensorflow",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "64918868e2154b06c7479347a59a4230f785e9fa"
                },
                {
                  "introduced": "a4dfb8d1a71385bd6d122e4f27f86dcebb96712d"
                },
                {
                  "fixed": "957590ea15cc03ee2e00fc61934647d54836676f"
                },
                {
                  "introduced": "919f693420e35d00c8d0a42100837ae3718f7927"
                },
                {
                  "last_affected": "919f693420e35d00c8d0a42100837ae3718f7927"
                },
                {
                  "fixed": "f09caa532b6e1ac8d2aa61b7832c78c5b79300c6"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.4.4"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.5.0"
                      },
                      {
                        "fixed": "2.5.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:google:tensorflow:2.6.0:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.6.0"
                      },
                      {
                        "last_affected": "2.6.0"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "range": [
                      {
                        "fixed": "f09caa532b6e1ac8d2aa61b7832c78c5b79300c6"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "2.6.0",
            "v2.4.3",
            "v2.6.0",
            "v2.5.1",
            "v2.4.2",
            "v2.5.0",
            "v2.4.1",
            "v2.4.0",
            "v2.4.0-rc4",
            "v2.4.0-rc3",
            "v2.4.0-rc2",
            "v2.4.0-rc1",
            "v2.4.0-rc0",
            "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-41201.json",
            "vanir_signatures": [
              {
                "id": "CVE-2021-41201-226a60e4",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "141905112899492031223794849617861307288",
                    "112038477235743827839372892291842258249",
                    "170975050589493231570475037762606861166",
                    "68337176800392024894984584326475332397",
                    "142337196627897338210775832564867888710",
                    "12496768335631061499268374405747235885",
                    "70316624304027663167065905435451745094",
                    "257031488753826738390530659968268068871"
                  ]
                },
                "source": "https://github.com/tensorflow/tensorflow/commit/f09caa532b6e1ac8d2aa61b7832c78c5b79300c6",
                "target": {
                  "file": "tensorflow/core/kernels/linalg/einsum_op_impl.h"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T14:10:27Z"
          }
        }
      ],
      "modified": "2026-10-20T14:10:27.155985869Z",
      "provider": "osv",
      "references": [
        "https://github.com/tensorflow/tensorflow/commit/f09caa532b6e1ac8d2aa61b7832c78c5b79300c6",
        "https://github.com/tensorflow/tensorflow/security/advisories/GHSA-j86v-p27c-73fm"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-41201",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 388609,
  "published_at": "2021-11-05T20:15:08.097+00:00"
}