{"id":"CVE-2022-35982","published":"2022-09-16T21:30:13Z","modified":"2025-04-23T17:02:19Z","title":"Segfault in `SparseBincount` in TensorFlow","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"TensorFlow is an open source platform for machine learning. If `SparseBincount` is given inputs for `indices`, `values`, and `dense_shape` that do not make a valid sparse tensor, it results in a segfault that can be used to trigger a denial of service attack. We have patched the issue in GitHub commit 40adbe4dd15b582b0210dfbf40c243a62f5119fa. 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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.9,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00521,"percentile":0.4514,"provenance":"source"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-397c-5g2j-qxpv","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/40adbe4dd15b582b0210dfbf40c243a62f5119fa","tags":["x_refsource_MISC"]}],"priority":{"score":13.2,"factors":[{"name":"EPSS percentile","points":9.03},{"name":"CVSS severity","points":4.13}]},"vendorSlug":"tensorflow","affectedVersions":[{"vendor":"tensorflow","product":"tensorflow","versions":["< 2.7.2",">= 2.8.0, < 2.8.1",">= 2.9.0, < 2.9.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-23T13:59:14.283355Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"tensorflow","vulnerableRanges":["<2.7.2",">=2.8.0, <2.8.1",">=2.9.0, <2.9.1"],"patched":["2.7.2","2.8.1","2.9.1"],"from":["GHSA-397c-5g2j-qxpv","PYSEC-2026-3093"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-cpu","vulnerableRanges":["<2.7.2",">=2.8.0, <2.8.1",">=2.9.0, <2.9.1"],"patched":["2.7.2","2.8.1","2.9.1"],"from":["GHSA-397c-5g2j-qxpv","PYSEC-2026-3270"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-gpu","vulnerableRanges":["<2.7.2",">=2.8.0, <2.8.1",">=2.9.0, <2.9.1"],"patched":["2.7.2","2.8.1","2.9.1"],"from":["GHSA-397c-5g2j-qxpv","PYSEC-2026-947"],"provenance":"source"}],"summary":{"text":"The flaw is an improper input validation issue in the SparseBincount operation of TensorFlow, where malformed indices, values, or dense_shape inputs that do not form a valid sparse tensor cause a segfault. An unauthenticated remote attacker over the network can exploit it to crash the process and cause denial of service, with the attack requiring a high-complexity condition to succeed.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:47:30Z"},"euvd":{"id":"EUVD-2022-6675","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2020-15203","parents":[{"from":"CVE-2020-15203","to":"CVE-2022-35982","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/BUILD"],"commits":["https://github.com/tensorflow/tensorflow/commit/33be22c65d86256e6826666662e40dbdfe70ee83","https://github.com/tensorflow/tensorflow/commit/40adbe4dd15b582b0210dfbf40c243a62f5119fa"],"basis":"shared function","functions":["tf_kernel_library"]}]},{"from":"CVE-2021-41226","to":"CVE-2022-35982","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/bincount_op.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/f410212e373eb2aec4c9e60bf3702eba99a38aba","https://github.com/tensorflow/tensorflow/commit/40adbe4dd15b582b0210dfbf40c243a62f5119fa"],"basis":"shared function","functions":["SparseBincountOp"]}]},{"from":"CVE-2022-21737","to":"CVE-2022-35982","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/bincount_op.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/7019ce4f68925fd01cdafde26f8d8c938f47e6f9","https://github.com/tensorflow/tensorflow/commit/40adbe4dd15b582b0210dfbf40c243a62f5119fa"],"basis":"shared function","functions":["SparseBincountOp"]}]},{"from":"CVE-2022-29203","to":"CVE-2022-35982","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/BUILD"],"commits":["https://github.com/tensorflow/tensorflow/commit/acd56b8bcb72b163c834ae4f18469047b001fadf","https://github.com/tensorflow/tensorflow/commit/40adbe4dd15b582b0210dfbf40c243a62f5119fa"],"basis":"shared function","functions":["tf_kernel_library"]}]}]}}