{"id":"CVE-2022-29206","aliases":["CVE-2022-29206","GHSA-rc9w-5c64-9vqq","BIT-TENSORFLOW-2022-29206","PYSEC-2026-1032","PYSEC-2026-3235","PYSEC-2026-3365"],"related":[],"kind":"vulnerability","state":"published","title":"Missing validation results in undefined behavior in `SparseTensorDenseAdd` in TensorFlow","summary":"TensorFlow is an open source platform for machine learning. Prior to versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4, the implementation of `tf.raw_ops.SparseTensorDenseAdd` does not fully validate the input arguments. In this case, a reference gets bound to a `nullptr` during kernel execution. This is undefined behavior. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"TensorFlow is an open source platform for machine learning. Prior to versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4, the implementation of `tf.raw_ops.SparseTensorDenseAdd` does not fully validate the input arguments. In this case, a reference gets bound to a `nullptr` during kernel execution. This is undefined behavior. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.","source":"cvelist"},{"lang":"en","text":"### Impact\nThe implementation of [`tf.raw_ops.SparseTensorDenseAdd`](https://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/core/kernels/sparse_tensor_dense_add_op.cc) does not fully validate the input arguments:\n\n```python\nimport tensorflow as tf\n\na_indices = tf.constant(0, shape=[17, 2], dtype=tf.int64)\na_values = tf.constant([], shape=[0], dtype=tf.float32)\na_shape = tf.constant([6, 12], shape=[2], dtype=tf.int64)\n\nb = tf.constant(-0.223668531, shape=[6, 12], dtype=tf.float32)\n\ntf.raw_ops.SparseTensorDenseAdd(\n    a_indices=a_indices, a_values=a_values, a_shape=a_shape, b=b)\n```\n\nIn this case, a reference gets bound to a `nullptr` during kernel execution. This is UB.\n\n### Patches\nWe have patched the issue in GitHub commit [11ced8467eccad9c7cb94867708be8fa5c66c730](https://github.com/tensorflow/tensorflow/commit/11ced8467eccad9c7cb94867708be8fa5c66c730).\n\nThe fix will be included in TensorFlow 2.9.0. We will also cherrypick this commit on TensorFlow 2.8.1, TensorFlow 2.7.2, and TensorFlow 2.6.4, as these are also affected and still in supported range.\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.\n\n### Attribution\nThis vulnerability has been reported by Neophytos Christou from Secure Systems Lab at Brown University.","format":"markdown","source":"ghsa"},{"lang":"es","text":"TensorFlow es una plataforma de código abierto para el aprendizaje automático. En versiones anteriores a 2.9.0, 2.8.1, 2.7.2 y 2.6.4, la implementación de \"tf.raw_ops.SparseTensorDenseAdd\" no comprobaba completamente los argumentos de entrada. En este caso, una referencia es vinculada a un \"nullptr\" durante la ejecución del kernel. Esto es un comportamiento no definido. Las versiones 2.9.0, 2.8.1, 2.7.2 y 2.6.4 contienen un parche para este problema","source":"nvd"}],"published":"2022-05-20T22:15:13.000Z","modified":"2026-09-08T08:48:20.204Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:L/AC:L/Au:N/C:N/I:N/A:P","score":2.1,"rating":"LOW"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-20","CWE-476"],"affected":[{"ranges":[{"version":"< 2.6.4","status":"affected"},{"version":">= 2.7.0rc0, < 2.7.2","status":"affected"},{"version":">= 2.8.0rc0, < 2.8.1","status":"affected"},{"version":">= 2.9.0rc0, < 2.9.0","status":"affected"}],"vendor":"tensorflow","product":"tensorflow","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.6.4"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.7.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":"0","status":"affected","fixed":"2.6.4"}],"ecosystem":"PyPI","package":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.7.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":"0","status":"affected","fixed":"2.6.4"}],"ecosystem":"PyPI","package":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.7.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":[{"status":"affected","fixed":"2.6.4"},{"status":"affected","introduced":"2.7.0","fixed":"2.7.2"},{"status":"affected","version":"2.7.0"},{"status":"affected","version":"2.7.0"},{"status":"affected","version":"2.8.0"},{"status":"affected","version":"2.8.0"},{"status":"affected","version":"2.8.0"},{"status":"affected","version":"2.9.0"},{"status":"affected","version":"2.9.0"}],"vendor":"google","product":"tensorflow","cpe":"cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.6.4"},{"type":"ecosystem","introduced":"2.7.0","status":"affected","fixed":"2.7.2"},{"type":"ecosystem","introduced":"2.8.0","status":"affected","fixed":"2.8.1"}],"ecosystem":"PyPI","package":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","source":"pysec"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.6.4"},{"type":"ecosystem","introduced":"2.7.0","status":"affected","fixed":"2.7.2"},{"type":"ecosystem","introduced":"2.8.0","status":"affected","fixed":"2.8.1"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","source":"pysec"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.6.4"},{"type":"ecosystem","introduced":"2.7.0","status":"affected","fixed":"2.7.2"},{"type":"ecosystem","introduced":"2.8.0","status":"affected","fixed":"2.8.1"}],"ecosystem":"PyPI","package":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","source":"pysec"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.6.4"},{"type":"semver","introduced":"2.7.0","status":"affected","fixed":"2.7.2"},{"type":"semver","introduced":"2.8.0","status":"affected","fixed":"2.8.1"}],"ecosystem":"Bitnami","package":"tensorflow","purl":"pkg:bitnami/tensorflow","source":"bitnami"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.6.4","tags":["advisory","release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.7.2","tags":["advisory","release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.8.1","tags":["advisory","release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.9.0","tags":["advisory","release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-rc9w-5c64-9vqq","tags":["advisory","exploit","patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow/commit/11ced8467eccad9c7cb94867708be8fa5c66c730","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/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/core/kernels/sparse_tensor_dense_add_op.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-29206","tags":["advisory","web"],"sources":["ghsa","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/tensorflow-gpu","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-rc9w-5c64-9vqq","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":"poc","automatable":"no","technicalImpact":"partial","date":"2025-04-22T15:46:57.932Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-29206","url":"https://www.cve.org/CVERecord?id=CVE-2022-29206","licence":"CVE Terms of Use","modified":"2025-04-22T17:58:39.550Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rc9w-5c64-9vqq","url":"https://github.com/advisories/GHSA-rc9w-5c64-9vqq","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:38.746Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-29206","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-29206","licence":"Public domain","modified":"2026-06-17T04:39:49.280Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-1032","url":"https://osv.dev/vulnerability/PYSEC-2026-1032","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:38.746Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-3235","url":"https://osv.dev/vulnerability/PYSEC-2026-3235","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:38.746Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-3365","url":"https://osv.dev/vulnerability/PYSEC-2026-3365","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:38.746Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-TENSORFLOW-2022-29206","url":"https://osv.dev/vulnerability/BIT-TENSORFLOW-2022-29206","licence":"Apache-2.0","modified":"2026-09-08T08:48:20.204Z"}],"updatedAt":"2026-11-25T22:58:11.876Z","epss":{"score":0.00364,"percentile":0.32242,"date":"2026-12-01T12:00:22.000Z"}}