{"id":"CVE-2021-37676","published":"2021-08-12T21:40:27Z","modified":"2024-08-04T01:23:01Z","title":"Reference binding to nullptr in shape inference in TensorFlow","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can cause undefined behavior via binding a reference to null pointer in `tf.raw_ops.SparseFillEmptyRows`. The shape inference [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/ops/sparse_ops.cc#L608-L634) does not validate that the input arguments are not empty tensors. We have patched the issue in GitHub commit 578e634b4f1c1c684d4b4294f9e5281b2133b3ed. 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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00173,"percentile":0.03987,"provenance":"source"},"cwes":[{"id":"CWE-824","name":"Access of Uninitialized Pointer"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-v768-w7m9-2vmm","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/578e634b4f1c1c684d4b4294f9e5281b2133b3ed","tags":["x_refsource_MISC"]}],"priority":{"score":6.3,"factors":[{"name":"EPSS percentile","points":0.8},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"tensorflow","affectedVersions":[{"vendor":"tensorflow","product":"tensorflow","versions":[">= 2.5.0, < 2.5.1",">= 2.4.0, < 2.4.3","< 2.3.4"]}],"affected":[{"ecosystem":"PyPI","package":"tensorflow","vulnerableRanges":["<2.3.4",">=2.4.0, <2.4.3",">=2.5.0, <2.5.1",">=2.3.0, <2.3.4"],"patched":["2.3.4","2.4.3","2.5.1"],"from":["GHSA-v768-w7m9-2vmm","PYSEC-2021-298"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-cpu","vulnerableRanges":["<2.3.4",">=2.4.0, <2.4.3",">=2.5.0, <2.5.1",">=2.3.0, <2.3.4"],"patched":["2.3.4","2.4.3","2.5.1"],"from":["GHSA-v768-w7m9-2vmm","PYSEC-2021-589"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-gpu","vulnerableRanges":["<2.3.4",">=2.4.0, <2.4.3",">=2.5.0, <2.5.1",">=2.3.0, <2.3.4"],"patched":["2.3.4","2.4.3","2.5.1"],"from":["GHSA-v768-w7m9-2vmm","PYSEC-2021-787"],"provenance":"source"}],"summary":{"text":"The flaw is in TensorFlow's shape inference for tf.raw_ops.SparseFillEmptyRows, where a reference is bound to a null pointer because the implementation does not check that its input tensors are non-empty. An attacker with local access and low privileges, without any user interaction, can trigger undefined behavior by supplying empty input tensors to that operation.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:14:02Z"},"euvd":{"id":"EUVD-2021-0402","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2021-37676","children":[{"from":"CVE-2021-37676","to":"CVE-2021-41215","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/ops/sparse_ops.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/578e634b4f1c1c684d4b4294f9e5281b2133b3ed","https://github.com/tensorflow/tensorflow/commit/d3738dd70f1c9ceb547258cbb82d853da8771850"],"basis":"shared function","functions":["REGISTER_OP"]}]}]}}