CVE-2021-29600

Source
https://cve.org/CVERecord?id=CVE-2021-29600
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-29600.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-29600
Aliases
Related
Published
2021-05-14T20:15:15.443Z
Modified
2026-04-11T17:25:49.775470Z
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 end-to-end open source platform for machine learning. The implementation of the OneHot TFLite operator is vulnerable to a division by zero error(https://github.com/tensorflow/tensorflow/blob/f61c57bd425878be108ec787f4d96390579fb83e/tensorflow/lite/kernels/one_hot.cc#L68-L72). An attacker can craft a model such that at least one of the dimensions of indices would be 0. In turn, the prefix_dim_size value would become 0. 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.

References

Affected packages

Git / github.com/tensorflow/tensorflow

Affected ranges

Type
GIT
Repo
https://github.com/tensorflow/tensorflow
Events
Database specific
{
    "versions": [
        {
            "introduced": "0"
        },
        {
            "fixed": "2.1.4"
        },
        {
            "introduced": "2.2.0"
        },
        {
            "fixed": "2.2.3"
        },
        {
            "introduced": "2.3.0"
        },
        {
            "fixed": "2.3.3"
        },
        {
            "introduced": "2.4.0"
        },
        {
            "fixed": "2.4.2"
        }
    ]
}

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
v2.*
v2.1.0
v2.1.0-rc0
v2.1.0-rc1
v2.1.0-rc2
v2.1.1
v2.1.2
v2.1.3
v2.2.0
v2.2.1
v2.2.2
v2.3.0
v2.3.1
v2.3.2
v2.4.0
v2.4.1

Database specific

vanir_signatures
[
    {
        "signature_type": "Function",
        "source": "https://github.com/tensorflow/tensorflow/commit/3ebedd7e345453d68e279cfc3e4072648e5e12e5",
        "signature_version": "v1",
        "target": {
            "file": "tensorflow/lite/kernels/one_hot.cc",
            "function": "OneHotComputeImpl"
        },
        "id": "CVE-2021-29600-68128bbf",
        "deprecated": false,
        "digest": {
            "function_hash": "234466476271358212335257110268637504283",
            "length": 768.0
        }
    },
    {
        "signature_type": "Line",
        "source": "https://github.com/tensorflow/tensorflow/commit/3ebedd7e345453d68e279cfc3e4072648e5e12e5",
        "signature_version": "v1",
        "target": {
            "file": "tensorflow/lite/kernels/one_hot.cc"
        },
        "id": "CVE-2021-29600-8a50b8be",
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "42003532578999314787882280487053268355",
                "194553501035850259714233139594993459018",
                "166273184646060952141122187757631200671",
                "151367335375563751706126221056399935532"
            ],
            "threshold": 0.9
        }
    }
]
source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-29600.json"
vanir_signatures_modified
"2026-04-11T17:25:49Z"