{"id":"CVE-2022-21736","published":"2022-02-03T12:08:03Z","modified":"2025-05-05T16:31:35Z","title":"Undefined behavior in Tensorflow","vendor":null,"product":null,"tier":"tail","description":{"text":"Tensorflow is an Open Source Machine Learning Framework. The implementation of `SparseTensorSliceDataset` has an undefined behavior: under certain condition it can be made to dereference a `nullptr` value. The 3 input arguments to `SparseTensorSliceDataset` represent a sparse tensor. However, there are some preconditions that these arguments must satisfy but these are not validated in the implementation. 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":7.6,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00752,"percentile":0.5594,"provenance":"source"},"cwes":[{"id":"CWE-476","name":"NULL Pointer Dereference"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-pfjj-m3jj-9jc9","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/965b97e4a9650495cda5a8c210ef6684b4b9eceb","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/blob/5100e359aef5c8021f2e71c7b986420b85ce7b3d/tensorflow/core/kernels/data/sparse_tensor_slice_dataset_op.cc#L227-L292","tags":["x_refsource_MISC"]}],"priority":{"score":16.5,"factors":[{"name":"EPSS percentile","points":11.19},{"name":"CVSS severity","points":5.32}]},"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-25T15:47:19.865315Z","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-pfjj-m3jj-9jc9","PYSEC-2026-3223"],"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-pfjj-m3jj-9jc9","PYSEC-2022-60"],"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-pfjj-m3jj-9jc9","PYSEC-2022-115"],"provenance":"source"}],"summary":{"text":"The flaw is a NULL pointer dereference, a form of undefined behavior, in the SparseTensorSliceDataset implementation of TensorFlow, an open source machine learning framework, where unvalidated preconditions on its three sparse-tensor input arguments allow a nullptr to be dereferenced. An attacker with network access and low-privileged credentials can trigger the crash by supplying crafted sparse tensor inputs, with no user interaction required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:09:59Z"},"euvd":{"id":"EUVD-2022-0299","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2021-37647","parents":[{"from":"CVE-2021-37647","to":"CVE-2022-21736","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/data/sparse_tensor_slice_dataset_op.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/02cc160e29d20631de3859c6653184e3f876b9d7","https://github.com/tensorflow/tensorflow/commit/965b97e4a9650495cda5a8c210ef6684b4b9eceb"],"basis":"shared function","functions":["SparseTensorSliceDatasetOp"]}]}]}}