CVE-2021-41216

Source
https://cve.org/CVERecord?id=CVE-2021-41216
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-41216.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-41216
Aliases
Downstream
Related
Published
2021-11-05T23:15:08.287Z
Modified
2026-08-04T16:07:10.319080Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

TensorFlow is an open source platform for machine learning. In affected versions the shape inference function for Transpose is vulnerable to a heap buffer overflow. This occurs whenever perm contains negative elements. The shape inference function does not validate that the indices in perm are all valid. 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.

Database specific
{
    "unresolved_ranges": [
        {
            "cpes": [
                "cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*"
            ],
            "vendor_product": "google:tensorflow",
            "extracted_events": [
                {
                    "introduced": "2.4.0"
                },
                {
                    "fixed": "2.4.4"
                },
                {
                    "introduced": "2.5.0"
                },
                {
                    "fixed": "2.5.2"
                },
                {
                    "introduced": "2.6.0"
                },
                {
                    "fixed": "2.6.1"
                }
            ],
            "source": "CPE_RANGE"
        },
        {
            "cpes": [
                "cpe:2.3:a:google:tensorflow:2.7.0:rc0:*:*:*:*:*:*",
                "cpe:2.3:a:google:tensorflow:2.7.0:rc1:*:*:*:*:*:*"
            ],
            "vendor_product": "google:tensorflow",
            "extracted_events": [
                {
                    "introduced": "2.7.0-rc0"
                },
                {
                    "last_affected": "2.7.0-rc0"
                },
                {
                    "introduced": "2.7.0-rc1"
                },
                {
                    "last_affected": "2.7.0-rc1"
                }
            ],
            "source": "CPE_STRING"
        }
    ]
}
References

Affected packages

Git / github.com/tensorflow/tensorflow

Affected ranges

Type
GIT
Repo
https://github.com/tensorflow/tensorflow
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Database specific
{
    "source": "REFERENCES"
}

Affected versions

0.*
0.5.0
0.6.0
v1.*
v1.1.0-rc1
v1.1.0-rc2
v1.12.1
v1.6.0-rc1
v1.9.0-rc2

Database specific

vanir_signatures_modified
"2026-08-04T16:07:10Z"
vanir_signatures
[
    {
        "signature_version": "v1",
        "target": {
            "file": "tensorflow/core/ops/array_ops.cc",
            "function": "TransposeShapeFn"
        },
        "id": "CVE-2021-41216-672eed02",
        "signature_type": "Function",
        "deprecated": false,
        "digest": {
            "function_hash": "181552256744341066905165177180015404858",
            "length": 1453.0
        },
        "source": "https://github.com/tensorflow/tensorflow/commit/c79ba87153ee343401dbe9d1954d7f79e521eb14"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "tensorflow/core/ops/array_ops.cc"
        },
        "id": "CVE-2021-41216-bc8be734",
        "signature_type": "Line",
        "deprecated": false,
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "266743381774281060020999248406133656838",
                "236374775087804446372435152832663931624",
                "84121856896969401521915080741721432206",
                "176270502915930162546173284189151158970"
            ]
        },
        "source": "https://github.com/tensorflow/tensorflow/commit/c79ba87153ee343401dbe9d1954d7f79e521eb14"
    }
]
source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-41216.json"