{"id":"CVE-2021-37638","published":"2021-08-12T18:10:10Z","modified":"2024-08-04T01:23:01Z","title":"Null pointer dereference in `RaggedTensorToTensor` in TensorFlow","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"TensorFlow is an end-to-end open source platform for machine learning. Sending invalid argument for `row_partition_types` of `tf.raw_ops.RaggedTensorToTensor` API results in a null pointer dereference and undefined behavior. The [implementation](https://github.com/tensorflow/tensorflow/blob/47a06f40411a69c99f381495f490536972152ac0/tensorflow/core/kernels/ragged_tensor_to_tensor_op.cc#L328) accesses the first element of a user supplied list of values without validating that the provided list is not empty. We have patched the issue in GitHub commit 301ae88b331d37a2a16159b65b255f4f9eb39314. 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.7,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00167,"percentile":0.03426,"provenance":"source"},"cwes":[{"id":"CWE-476","name":"NULL Pointer Dereference"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-hwr7-8gxx-fj5p","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/301ae88b331d37a2a16159b65b255f4f9eb39314","tags":["x_refsource_MISC"]}],"priority":{"score":6.1,"factors":[{"name":"EPSS percentile","points":0.69},{"name":"CVSS severity","points":5.39}]},"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-hwr7-8gxx-fj5p","PYSEC-2021-260"],"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-hwr7-8gxx-fj5p","PYSEC-2021-551"],"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-hwr7-8gxx-fj5p","PYSEC-2021-749"],"provenance":"source"}],"summary":{"text":"The flaw is a null pointer dereference in the RaggedTensorToTensor operation of TensorFlow, a machine learning platform: the implementation reads the first element of a user-supplied row_partition_types list without checking that the list is non-empty. An attacker who can call tf.raw_ops.RaggedTensorToTensor with an empty row_partition_types argument can trigger undefined behavior and a crash, and this requires only local access with the ability to run TensorFlow code, with no privileges or user interaction needed.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:14:49Z"},"euvd":{"id":"EUVD-2021-0364","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2021-29560","parents":[{"from":"CVE-2021-29560","to":"CVE-2021-37638","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/ragged_tensor_to_tensor_op.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/a84358aa12f0b1518e606095ab9cfddbf597c121","https://github.com/tensorflow/tensorflow/commit/301ae88b331d37a2a16159b65b255f4f9eb39314"],"basis":"shared function","functions":["RaggedTensorToTensorBaseOp"]}]},{"from":"CVE-2021-29608","to":"CVE-2021-37638","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/ragged_tensor_to_tensor_op.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/b761c9b652af2107cfbc33efd19be0ce41daa33e","https://github.com/tensorflow/tensorflow/commit/c4d7afb6a5986b04505aca4466ae1951686c80f6","https://github.com/tensorflow/tensorflow/commit/301ae88b331d37a2a16159b65b255f4f9eb39314"],"basis":"shared function","functions":["RaggedTensorToTensorBaseOp"]}]}]}}