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:08Z
Modified
2026-08-07T17:02:57Z
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.

References

Affected packages

Git / github.com/tensorflow/tensorflow

Affected ranges

Type
GIT
Repo
https://github.com/tensorflow/tensorflow
Events
Database specific
Show details
{
    "cpe": [
        "cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*",
        "cpe:2.3:a:google:tensorflow:2.7.0:rc0:*:*:*:*:*:*",
        "cpe:2.3:a:google:tensorflow:2.7.0:rc1:*:*:*:*:*:*"
    ],
    "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"
        },
        {
            "introduced": "2.7.0-rc0"
        },
        {
            "last_affected": "2.7.0-rc0"
        },
        {
            "introduced": "2.7.0-rc1"
        },
        {
            "last_affected": "2.7.0-rc1"
        }
    ],
    "source": [
        "CPE_RANGE",
        "CPE_STRING",
        "REFERENCES"
    ]
}

Affected versions

2.*
2.7.0-rc0
2.7.0-rc1
v2.*
v2.4.0
v2.4.1
v2.4.2
v2.4.3
v2.5.0
v2.5.1
v2.6.0
v2.7.0-rc0
v2.7.0-rc1

Database specific

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