CVE-2021-37681

Source
https://cve.org/CVERecord?id=CVE-2021-37681
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-37681.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-37681
Aliases
Downstream
Related
Published
2021-08-12T22:15:08.867Z
Modified
2026-04-11T16:26:21.071540Z
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. In affected versions the implementation of SVDF in TFLite is vulnerable to a null pointer error. The GetVariableInput function can return a null pointer but GetTensorData assumes that the argument is always a valid tensor. Furthermore, because GetVariableInput calls GetMutableInput which might return nullptr, the tensor->is_variable expression can also trigger a null pointer exception. We have patched the issue in GitHub commit 5b048e87e4e55990dae6b547add4dae59f4e1c76. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.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
Introduced
Fixed
Introduced
Fixed
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Fixed
Database specific
{
    "versions": [
        {
            "introduced": "2.3.0"
        },
        {
            "fixed": "2.3.4"
        },
        {
            "introduced": "2.4.0"
        },
        {
            "fixed": "2.4.3"
        },
        {
            "introduced": "0"
        },
        {
            "last_affected": "2.5.0"
        },
        {
            "introduced": "0"
        },
        {
            "last_affected": "2.6.0-rc0"
        },
        {
            "introduced": "0"
        },
        {
            "last_affected": "2.6.0-rc1"
        },
        {
            "introduced": "0"
        },
        {
            "last_affected": "2.6.0-rc2"
        }
    ]
}

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.3.0
v2.3.1
v2.3.2
v2.3.3
v2.4.0
v2.4.1
v2.4.2
v2.5.0
v2.5.0-rc0
v2.5.0-rc1
v2.5.0-rc2
v2.5.0-rc3
v2.6.0-rc0
v2.6.0-rc1
v2.6.0-rc2

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-37681.json"
vanir_signatures
[
    {
        "digest": {
            "length": 3763.0,
            "function_hash": "277771564071844196417094966686928471885"
        },
        "id": "CVE-2021-37681-02a04b81",
        "deprecated": false,
        "signature_version": "v1",
        "signature_type": "Function",
        "source": "https://github.com/tensorflow/tensorflow/commit/5b048e87e4e55990dae6b547add4dae59f4e1c76",
        "target": {
            "function": "Eval",
            "file": "tensorflow/lite/kernels/svdf.cc"
        }
    },
    {
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "171307121571642068695454032622458007569",
                "29941410466284478930787366860551228937",
                "221556527070209520502004048032332303571",
                "199258940345129842197877996600733491640"
            ]
        },
        "id": "CVE-2021-37681-33364e90",
        "deprecated": false,
        "signature_version": "v1",
        "signature_type": "Line",
        "source": "https://github.com/tensorflow/tensorflow/commit/5b048e87e4e55990dae6b547add4dae59f4e1c76",
        "target": {
            "file": "tensorflow/lite/kernels/svdf.cc"
        }
    },
    {
        "digest": {
            "length": 169.0,
            "function_hash": "99754822290123940257327233292511093096"
        },
        "id": "CVE-2021-37681-41806392",
        "deprecated": false,
        "signature_version": "v1",
        "signature_type": "Function",
        "source": "https://github.com/tensorflow/tensorflow/commit/5b048e87e4e55990dae6b547add4dae59f4e1c76",
        "target": {
            "function": "GetVariableInput",
            "file": "tensorflow/lite/kernels/kernel_util.cc"
        }
    },
    {
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "187287587552228953845727315607235521446",
                "286719328079571892617242822217036577720",
                "326163651760032361359206415215756972294",
                "132640206525196469370031657143121165862"
            ]
        },
        "id": "CVE-2021-37681-e23df497",
        "deprecated": false,
        "signature_version": "v1",
        "signature_type": "Line",
        "source": "https://github.com/tensorflow/tensorflow/commit/5b048e87e4e55990dae6b547add4dae59f4e1c76",
        "target": {
            "file": "tensorflow/lite/kernels/kernel_util.cc"
        }
    }
]
vanir_signatures_modified
"2026-04-11T16:26:21Z"