{"id":"CVE-2022-23589","published":"2022-02-04T22:32:20Z","modified":"2025-04-22T18:25:46Z","title":"Null pointer dereference in Grappler's `IsConstant` in Tensorflow","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"Tensorflow is an Open Source Machine Learning Framework. Under certain scenarios, Grappler component of TensorFlow can trigger a null pointer dereference. There are 2 places where this can occur, for the same malicious alteration of a `SavedModel` file (fixing the first one would trigger the same dereference in the second place). First, during constant folding, the `GraphDef` might not have the required nodes for the binary operation. If a node is missing, the correposning `mul_*child` would be null, and the dereference in the subsequent line would be incorrect. We have a similar issue during `IsIdentityConsumingSwitch`. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01068,"percentile":0.64231,"provenance":"source"},"cwes":[{"id":"CWE-476","name":"NULL Pointer Dereference"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-9px9-73fg-3fqp","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/045deec1cbdebb27d817008ad5df94d96a08b1bf","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/commit/0a365c029e437be0349c31f8d4c9926b69fa3fa1","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/blob/a1320ec1eac186da1d03f033109191f715b2b130/tensorflow/core/grappler/mutable_graph_view.cc#L59-L74","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/blob/a1320ec1eac186da1d03f033109191f715b2b130/tensorflow/core/grappler/optimizers/constant_folding.cc#L3466-L3497","tags":["x_refsource_MISC"]}],"priority":{"score":17.4,"factors":[{"name":"EPSS percentile","points":12.85},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"tensorflow","affectedVersions":[{"vendor":"tensorflow","product":"tensorflow","versions":[">= 2.7.0, < 2.7.1",">= 2.6.0, < 2.6.3","< 2.5.3"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-22T15:50:53.419550Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"tensorflow","vulnerableRanges":["<2.5.3",">=2.6.0, <2.6.3",">=2.7.0, <2.7.1"],"patched":["2.5.3","2.6.3","2.7.1"],"from":["GHSA-9px9-73fg-3fqp","PYSEC-2026-3154"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-cpu","vulnerableRanges":["<2.5.3",">=2.6.0, <2.6.3",">=2.7.0, <2.7.1"],"patched":["2.5.3","2.6.3","2.7.1"],"from":["GHSA-9px9-73fg-3fqp","PYSEC-2022-98"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-gpu","vulnerableRanges":["<2.5.3",">=2.6.0, <2.6.3",">=2.7.0, <2.7.1"],"patched":["2.5.3","2.6.3","2.7.1"],"from":["GHSA-9px9-73fg-3fqp","PYSEC-2022-153"],"provenance":"source"}],"summary":{"text":"A null pointer dereference in the Grappler graph optimization component of TensorFlow, specifically in its IsConstant logic during constant folding and in IsIdentityConsumingSwitch, occurs when a SavedModel file has been maliciously altered so that required nodes are missing from the GraphDef. An attacker who can supply a crafted SavedModel file to a user with low privileges, with no user interaction required, can crash the process and cause a denial of service.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:40:24Z"},"euvd":{"id":"EUVD-2022-0337","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2022-23581","parents":[{"from":"CVE-2022-23581","to":"CVE-2022-23589","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/grappler/optimizers/constant_folding.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/1fb27733f943295d874417630edd3b38b34ce082","https://github.com/tensorflow/tensorflow/commit/240655511cd3e701155f944a972db71b6c0b1bb6","https://github.com/tensorflow/tensorflow/commit/045deec1cbdebb27d817008ad5df94d96a08b1bf","https://github.com/tensorflow/tensorflow/commit/0a365c029e437be0349c31f8d4c9926b69fa3fa1"],"basis":"rarely changed file"}]},{"from":"CVE-2022-23588","to":"CVE-2022-23589","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/grappler/optimizers/constant_folding.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/6b5adc0877de832b2a7c189532dbbbc64622eeb6","https://github.com/tensorflow/tensorflow/commit/045deec1cbdebb27d817008ad5df94d96a08b1bf","https://github.com/tensorflow/tensorflow/commit/0a365c029e437be0349c31f8d4c9926b69fa3fa1"],"basis":"rarely changed file"}]}]}}