{"id":"CVE-2021-29539","published":"2021-05-14T19:11:32Z","modified":"2024-08-03T22:11:06Z","title":"Segfault in tf.raw_ops.ImmutableConst","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"TensorFlow is an end-to-end open source platform for machine learning. Calling `tf.raw_ops.ImmutableConst`(https://www.tensorflow.org/api_docs/python/tf/raw_ops/ImmutableConst) with a `dtype` of `tf.resource` or `tf.variant` results in a segfault in the implementation as code assumes that the tensor contents are pure scalars. We have patched the issue in 4f663d4b8f0bec1b48da6fa091a7d29609980fa4 and will release TensorFlow 2.5.0 containing the patch. TensorFlow nightly packages after this commit will also have the issue resolved. If using `tf.raw_ops.ImmutableConst` in code, you can prevent the segfault by inserting a filter for the `dtype` argument.","provenance":"source","from":"CVE.org"},"cvss":{"score":2.5,"severity":"LOW","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00189,"percentile":0.08718,"provenance":"source"},"cwes":[{"id":"CWE-681","name":"Incorrect Conversion between Numeric Types"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-g4h2-gqm3-c9wq","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/4f663d4b8f0bec1b48da6fa091a7d29609980fa4","tags":["x_refsource_MISC"]}],"priority":{"score":3.5,"factors":[{"name":"EPSS percentile","points":1.74},{"name":"CVSS severity","points":1.75}]},"vendorSlug":"tensorflow","affectedVersions":[{"vendor":"tensorflow","product":"tensorflow","versions":["< 2.1.4",">= 2.2.0, < 2.2.3",">= 2.3.0, < 2.3.3",">= 2.4.0, < 2.4.2"]}],"affected":[{"ecosystem":"PyPI","package":"tensorflow","vulnerableRanges":["<2.1.4",">=2.2.0, <2.2.3",">=2.3.0, <2.3.3",">=2.4.0, <2.4.2","<2.2.0rc0",">=2.2.0, <2.3.0rc0",">=2.3.0, <2.3.4",">=2.4.0, <2.4.3"],"patched":["2.1.4","2.2.3","2.3.3","2.4.2","2.2.0rc0","2.3.0rc0","2.3.4","2.4.3"],"from":["GHSA-g4h2-gqm3-c9wq","PYSEC-2021-176"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-cpu","vulnerableRanges":["<2.1.4",">=2.2.0, <2.2.3",">=2.3.0, <2.3.3",">=2.4.0, <2.4.2","<2.2.0rc0",">=2.2.0, <2.3.0rc0",">=2.3.0, <2.3.4",">=2.4.0, <2.4.3"],"patched":["2.1.4","2.2.3","2.3.3","2.4.2","2.2.0rc0","2.3.0rc0","2.3.4","2.4.3"],"from":["GHSA-g4h2-gqm3-c9wq","PYSEC-2021-467"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-gpu","vulnerableRanges":["<2.1.4",">=2.2.0, <2.2.3",">=2.3.0, <2.3.3",">=2.4.0, <2.4.2","<2.2.0rc0",">=2.2.0, <2.3.0rc0",">=2.3.0, <2.3.4",">=2.4.0, <2.4.3"],"patched":["2.1.4","2.2.3","2.3.3","2.4.2","2.2.0rc0","2.3.0rc0","2.3.4","2.4.3"],"from":["GHSA-g4h2-gqm3-c9wq","PYSEC-2021-665"],"provenance":"source"}],"summary":{"text":"The flaw is a segmentation fault in TensorFlow's tf.raw_ops.ImmutableConst operation, which crashes when the dtype argument is tf.resource or tf.variant because the implementation assumes the tensor contents are pure scalars. An attacker with local access who can get the application to call this operation with those dtypes, and who has low privileges and an elevated attack complexity to work with, can crash the process and cause availability loss, with no confidentiality or integrity impact.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:23:08Z"},"euvd":{"id":"EUVD-2021-0280","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2020-26268","parents":[{"from":"CVE-2020-26268","to":"CVE-2021-29539","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/immutable_constant_op.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/c1e1fc899ad5f8c725dcbb6470069890b5060bc7","https://github.com/tensorflow/tensorflow/commit/4f663d4b8f0bec1b48da6fa091a7d29609980fa4"],"basis":"rarely changed file"}]}],"children":[{"from":"CVE-2021-29539","to":"CVE-2021-41227","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/immutable_constant_op.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/4f663d4b8f0bec1b48da6fa091a7d29609980fa4","https://github.com/tensorflow/tensorflow/commit/1cb6bb6c2a6019417c9adaf9e6843ba75ee2580b","https://github.com/tensorflow/tensorflow/commit/3712a2d3455e6ccb924daa5724a3652a86f6b585"],"basis":"rarely changed file"}]}]}}