{"id":"CVE-2022-36012","aliases":["CVE-2022-36012","GHSA-jvhc-5hhr-w3v5","BIT-TENSORFLOW-2022-36012","PYSEC-2026-1015","PYSEC-2026-3210","PYSEC-2026-3347"],"related":[],"kind":"vulnerability","state":"published","title":"Assertion fail on MLIR empty edge names in TensorFlow","summary":"TensorFlow is an open source platform for machine learning. When `mlir::tfg::ConvertGenericFunctionToFunctionDef` is given empty function attributes, it crashes. We have patched the issue in GitHub commit ad069af92392efee1418c48ff561fd3070a03d7b. The fix will be included in TensorFlow 2.10.0. We will also cherrypick this commit on TensorFlow 2.9.1, TensorFlow 2.8.1, and TensorFlow 2.7.2, as these are also affected and still in supported range. There are no known workarounds for this issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"TensorFlow is an open source platform for machine learning. When `mlir::tfg::ConvertGenericFunctionToFunctionDef` is given empty function attributes, it crashes. We have patched the issue in GitHub commit ad069af92392efee1418c48ff561fd3070a03d7b. The fix will be included in TensorFlow 2.10.0. We will also cherrypick this commit on TensorFlow 2.9.1, TensorFlow 2.8.1, and TensorFlow 2.7.2, as these are also affected and still in supported range. There are no known workarounds for this issue.","source":"cvelist"},{"lang":"en","text":"### Impact\nWhen [`mlir::tfg::ConvertGenericFunctionToFunctionDef`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/ir/importexport/functiondef_import.cc) is given empty function attributes, it crashes.\n```cpp\n// We pre-allocate the array of operands and populate it using the\n// `output_name_to_position` and `control_output_to_position` populated\n// previously.\nSmallVector<Value> ret_vals(func.ret_size() + func.control_ret_size(),\n                            Value());\nfor (const auto& ret_val : func.ret()) {\n  auto position = output_name_to_position.find(ret_val.first);\n  if (position == output_name_to_position.end())\n    return InvalidArgument(\n        \"Can't import function, returned value references unknown output \"\n        \"argument \",\n        ret_val.first);\n  ret_vals[position->second] =\n      value_manager.GetValueOrCreatePlaceholder(ret_val.second);\n}\nfor (const auto& ret_val : func.control_ret()) {\n  auto position = control_output_to_position.find(ret_val.first);\n  if (position == control_output_to_position.end())\n    return InvalidArgument(\n        \"Can't import function, returned value references unknown output \"\n        \"argument \",\n        ret_val.first);\n  Value result = value_manager.GetValueOrCreatePlaceholder(\n      (Twine(\"^\") + ret_val.second).str());\n```\n`ret_val.second` cannot be empty. Neither can `input`.\n```cpp\n// Process every node and create a matching MLIR operation\nfor (const NodeDef& node : nodes) {\n  if (node.op().empty()) return InvalidArgument(\"empty op type\");\n  OperationState state(unknown_loc, absl::StrCat(\"tfg.\", node.op()));\n  // Fetch the inputs, creating placeholder if an input hasn't been visited.\n  for (const std::string& input : node.input())\n    state.operands.push_back(\n        value_manager.GetValueOrCreatePlaceholder(input));\n```\n\n\n### Patches\nWe have patched the issue in GitHub commit [ad069af92392efee1418c48ff561fd3070a03d7b](https://github.com/tensorflow/tensorflow/commit/ad069af92392efee1418c48ff561fd3070a03d7b).\n\nThe fix will be included in TensorFlow 2.10.0. We will also cherrypick this commit on TensorFlow 2.9.1, TensorFlow 2.8.1, and TensorFlow 2.7.2, as these are also affected and still in supported range.\n\n\n### For more information\nPlease consult [our security guide](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md) for more information regarding the security model and how to contact us with issues and questions.","format":"markdown","source":"ghsa"},{"lang":"es","text":"TensorFlow es una plataforma de código abierto para el aprendizaje automático. Cuando \"mlir::tfg::ConvertGenericFunctionToFunctionDef\" recibe atributos de función vacíos, se bloquea. Hemos parcheado el problema en el commit ad069af92392efee1418c48ff561fd3070a03d7b de GitHub. La corrección será incluida en TensorFlow versión 2.10.0. También seleccionaremos este compromiso en TensorFlow versión 2.9.1, TensorFlow versión 2.8.1, y TensorFlow versión 2.7.2, ya que estos también están afectados y todavía están en el rango admitido. No se presentan mitigaciones conocidas para este problema","source":"nvd"}],"published":"2022-09-16T21:19:48.000Z","modified":"2026-09-08T08:48:20.447Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.9,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.9,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-617"],"affected":[{"ranges":[{"version":"< 2.7.2","status":"affected"},{"version":">= 2.8.0, < 2.8.1","status":"affected"},{"version":">= 2.9.0, < 2.9.1","status":"affected"}],"vendor":"tensorflow","product":"tensorflow","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.7.2"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.8.0","status":"affected","fixed":"2.8.1"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.9.0","status":"affected","fixed":"2.9.1"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.7.2"}],"ecosystem":"PyPI","package":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.8.0","status":"affected","fixed":"2.8.1"}],"ecosystem":"PyPI","package":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.9.0","status":"affected","fixed":"2.9.1"}],"ecosystem":"PyPI","package":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.7.2"}],"ecosystem":"PyPI","package":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.8.0","status":"affected","fixed":"2.8.1"}],"ecosystem":"PyPI","package":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.9.0","status":"affected","fixed":"2.9.1"}],"ecosystem":"PyPI","package":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.7.2"},{"status":"affected","introduced":"2.8.0","fixed":"2.8.1"},{"status":"affected","introduced":"2.9.0","fixed":"2.9.1"},{"status":"affected","version":"2.10"},{"status":"affected","version":"2.10"},{"status":"affected","version":"2.10"},{"status":"affected","version":"2.10"}],"vendor":"google","product":"tensorflow","cpe":"cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.7.2"},{"type":"ecosystem","introduced":"2.8.0","status":"affected","fixed":"2.8.1"},{"type":"ecosystem","introduced":"2.9.0","status":"affected","fixed":"2.9.1"}],"ecosystem":"PyPI","package":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","source":"pysec"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.7.2"},{"type":"ecosystem","introduced":"2.8.0","status":"affected","fixed":"2.8.1"},{"type":"ecosystem","introduced":"2.9.0","status":"affected","fixed":"2.9.1"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","source":"pysec"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.7.2"},{"type":"ecosystem","introduced":"2.8.0","status":"affected","fixed":"2.8.1"},{"type":"ecosystem","introduced":"2.9.0","status":"affected","fixed":"2.9.1"}],"ecosystem":"PyPI","package":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","source":"pysec"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.7.2"},{"type":"semver","introduced":"2.8.0","status":"affected","fixed":"2.8.1"},{"type":"semver","introduced":"2.9.0","status":"affected","fixed":"2.9.1"}],"ecosystem":"Bitnami","package":"tensorflow","purl":"pkg:bitnami/tensorflow","source":"bitnami"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-jvhc-5hhr-w3v5","tags":["advisory","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow/commit/ad069af92392efee1418c48ff561fd3070a03d7b","tags":["advisory","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/ir/importexport/functiondef_import.cc","tags":["advisory","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-36012","tags":["advisory","web"],"sources":["ghsa","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.10.0","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/tensorflow-gpu","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-jvhc-5hhr-w3v5","tags":["advisory"],"sources":["pysec"]},{"url":"https://pypi.org/project/tensorflow","tags":["package"],"sources":["pysec"]},{"url":"https://pypi.org/project/tensorflow-cpu","tags":["package"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-04-23T13:57:42.760Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-36012","url":"https://www.cve.org/CVERecord?id=CVE-2022-36012","licence":"CVE Terms of Use","modified":"2025-04-23T16:58:59.855Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jvhc-5hhr-w3v5","url":"https://github.com/advisories/GHSA-jvhc-5hhr-w3v5","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:52.053Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-36012","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-36012","licence":"Public domain","modified":"2026-06-17T04:52:44.327Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-1015","url":"https://osv.dev/vulnerability/PYSEC-2026-1015","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:52.053Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-3210","url":"https://osv.dev/vulnerability/PYSEC-2026-3210","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:52.053Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-3347","url":"https://osv.dev/vulnerability/PYSEC-2026-3347","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:52.053Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-TENSORFLOW-2022-36012","url":"https://osv.dev/vulnerability/BIT-TENSORFLOW-2022-36012","licence":"Apache-2.0","modified":"2026-09-08T08:48:20.447Z"}],"updatedAt":"2026-11-25T22:58:15.080Z","epss":{"score":0.00716,"percentile":0.54997,"date":"2026-12-01T12:00:22.000Z"}}