{"id":"CVE-2021-41217","published":"2021-11-05T20:55:10Z","modified":"2024-08-04T03:08:31Z","title":"Null pointer exception when `Exit` node is not preceded by `Enter` op","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"TensorFlow is an open source platform for machine learning. In affected versions the process of building the control flow graph for a TensorFlow model is vulnerable to a null pointer exception when nodes that should be paired are not. This occurs because the code assumes that the first node in the pairing (e.g., an `Enter` node) always exists when encountering the second node (e.g., an `Exit` node). When this is not the case, `parent` is `nullptr` so dereferencing it causes a crash. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00187,"percentile":0.08533,"provenance":"source"},"cwes":[{"id":"CWE-476","name":"NULL Pointer Dereference"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-5crj-c72x-m7gq","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/05cbebd3c6bb8f517a158b0155debb8df79017ff","tags":["x_refsource_MISC"]}],"priority":{"score":5.6,"factors":[{"name":"EPSS percentile","points":1.71},{"name":"CVSS severity","points":3.85}]},"vendorSlug":"tensorflow","affectedVersions":[{"vendor":"tensorflow","product":"tensorflow","versions":[">= 2.6.0, < 2.6.1",">= 2.5.0, < 2.5.2","< 2.4.4"]}],"affected":[{"ecosystem":"PyPI","package":"tensorflow","vulnerableRanges":[">=2.6.0, <2.6.1",">=2.5.0, <2.5.2","<2.4.4",">=2.7.0rc0, <2.7.0"],"patched":["2.6.1","2.5.2","2.4.4","2.7.0"],"from":["GHSA-5crj-c72x-m7gq","PYSEC-2021-409"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-cpu","vulnerableRanges":[">=2.6.0, <2.6.1",">=2.5.0, <2.5.2","<2.4.4",">=2.7.0rc0, <2.7.0"],"patched":["2.6.1","2.5.2","2.4.4","2.7.0"],"from":["GHSA-5crj-c72x-m7gq","PYSEC-2021-626"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-gpu","vulnerableRanges":[">=2.6.0, <2.6.1",">=2.5.0, <2.5.2","<2.4.4",">=2.7.0rc0, <2.7.0"],"patched":["2.6.1","2.5.2","2.4.4","2.7.0"],"from":["GHSA-5crj-c72x-m7gq","PYSEC-2021-824"],"provenance":"source"}],"summary":{"text":"The flaw is a null pointer dereference in TensorFlow's control flow graph construction, which assumes an Enter node always precedes a paired Exit node and crashes when it does not. An attacker with local access and low privileges, acting without any user interaction, can trigger the crash by supplying a model whose paired nodes are not correctly matched, causing denial of service.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:19:03Z"},"euvd":{"id":"EUVD-2021-0439","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2021-41217","children":[{"from":"CVE-2021-41217","to":"CVE-2022-23578","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/common_runtime/immutable_executor_state.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/05cbebd3c6bb8f517a158b0155debb8df79017ff","https://github.com/tensorflow/tensorflow/commit/c79ccba517dbb1a0ccb9b01ee3bd2a63748b60dd"],"basis":"rarely changed file"}]}]}}