{"id":"CVE-2021-37664","published":"2021-08-12T20:25:23Z","modified":"2024-08-04T01:23:01Z","title":"Heap OOB in boosted trees 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 read from outside of bounds of heap allocated data by sending specially crafted illegal arguments to `BoostedTreesSparseCalculateBestFeatureSplit`. The [implementation](https://github.com/tensorflow/tensorflow/blob/84d053187cb80d975ef2b9684d4b61981bca0c41/tensorflow/core/kernels/boosted_trees/stats_ops.cc) needs to validate that each value in `stats_summary_indices` is in range. We have patched the issue in GitHub commit e84c975313e8e8e38bb2ea118196369c45c51378. 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.3,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00167,"percentile":0.06112,"provenance":"source"},"cwes":[{"id":"CWE-125","name":"Out-of-bounds Read"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-r4c4-5fpq-56wg","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/e84c975313e8e8e38bb2ea118196369c45c51378","tags":["x_refsource_MISC"]}],"priority":{"score":6.3,"factors":[{"name":"EPSS percentile","points":1.22},{"name":"CVSS severity","points":5.11}]},"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-r4c4-5fpq-56wg","PYSEC-2021-286"],"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-r4c4-5fpq-56wg","PYSEC-2021-577"],"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-r4c4-5fpq-56wg","PYSEC-2021-775"],"provenance":"source"}],"summary":{"text":"The flaw is an out-of-bounds read in the boosted trees code of TensorFlow, specifically in the BoostedTreesSparseCalculateBestFeatureSplit operation, where values in stats_summary_indices are not validated for range. An attacker who can supply specially crafted illegal arguments to that operation can read heap-allocated data beyond the intended bounds, and exploiting it requires the ability to invoke the operation with malicious input, which is a local-access condition with low privileges and no user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:15:56Z"},"euvd":{"id":"EUVD-2021-0390","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2021-37662","parents":[{"from":"CVE-2021-37662","to":"CVE-2021-37664","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/boosted_trees/stats_ops.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/429f009d2b2c09028647dd4bb7b3f6f414bbaad7","https://github.com/tensorflow/tensorflow/commit/9c87c32c710d0b5b53dc6fd3bfde4046e1f7a5ad","https://github.com/tensorflow/tensorflow/commit/e84c975313e8e8e38bb2ea118196369c45c51378"],"basis":"rarely changed file"}]}],"children":[{"from":"CVE-2021-37664","to":"CVE-2021-41208","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/boosted_trees/stats_ops.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/e84c975313e8e8e38bb2ea118196369c45c51378","https://github.com/tensorflow/tensorflow/commit/5c8c9a8bfe750f9743d0c859bae112060b216f5c"],"basis":"shared function","functions":["BoostedTreesSparseCalculateBestFeatureSplitOp"]}]}]}}