{"id":"CVE-2022-41887","published":"2022-11-18T00:00:00Z","modified":"2025-04-22T16:06:20Z","title":"Overflow in `tf.keras.losses.poisson` in Tensorflow","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"TensorFlow is an open source platform for machine learning. `tf.keras.losses.poisson` receives a `y_pred` and `y_true` that are passed through `functor::mul` in `BinaryOp`. If the resulting dimensions overflow an `int32`, TensorFlow will crash due to a size mismatch during broadcast assignment. We have patched the issue in GitHub commit c5b30379ba87cbe774b08ac50c1f6d36df4ebb7c. The fix will be included in TensorFlow 2.11. We will also cherrypick this commit on TensorFlow 2.10.1 and 2.9.3, as these are also affected and still in supported range. However, we will not cherrypick this commit into TensorFlow 2.8.x, as it depends on Eigen behavior that changed between 2.8 and 2.9.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.8,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0064,"percentile":0.51615,"provenance":"source"},"cwes":[{"id":"CWE-131","name":"Incorrect Calculation of Buffer Size"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-8fvv-46hw-vpg3","tags":[]},{"url":"https://github.com/tensorflow/tensorflow/commit/c5b30379ba87cbe774b08ac50c1f6d36df4ebb7c","tags":[]},{"url":"https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/cwise_ops_common.h","tags":[]},{"url":"https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/keras/losses.py","tags":[]}],"priority":{"score":13.7,"factors":[{"name":"EPSS percentile","points":10.32},{"name":"CVSS severity","points":3.36}]},"vendorSlug":"tensorflow","affectedVersions":[{"vendor":"tensorflow","product":"tensorflow","versions":[">= 2.10.0, < 2.10.1","< 2.9.3"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-22T15:42:29.614034Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"tensorflow","vulnerableRanges":["<2.9.3",">=2.10.0, <2.10.1"],"patched":["2.9.3","2.10.1"],"from":["GHSA-8fvv-46hw-vpg3","PYSEC-2026-3136"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-cpu","vulnerableRanges":["<2.9.3",">=2.10.0, <2.10.1"],"patched":["2.9.3","2.10.1"],"from":["GHSA-8fvv-46hw-vpg3","PYSEC-2026-3297"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-gpu","vulnerableRanges":["<2.9.3",">=2.10.0, <2.10.1"],"patched":["2.9.3","2.10.1"],"from":["GHSA-8fvv-46hw-vpg3","PYSEC-2026-970"],"provenance":"source"}],"summary":{"text":"The flaw is an integer overflow in the tf.keras.losses.poisson function of TensorFlow's Keras API, where the dimensions produced by the internal multiplication in BinaryOp can exceed the int32 range and lead to a buffer size calculation error. An attacker with network access and low privileges can trigger a crash (denial of service) by supplying inputs whose resulting dimensions overflow int32, which requires a user to interact with or run the affected operation.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:55:41Z"},"euvd":{"id":"EUVD-2022-7281","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2021-37659","parents":[{"from":"CVE-2021-37659","to":"CVE-2022-41887","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/cwise_ops_common.h"],"commits":["https://github.com/tensorflow/tensorflow/commit/93f428fd1768df147171ed674fee1fc5ab8309ec","https://github.com/tensorflow/tensorflow/commit/c5b30379ba87cbe774b08ac50c1f6d36df4ebb7c"],"basis":"rarely changed file"}]},{"from":"CVE-2022-23583","to":"CVE-2022-41887","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/cwise_ops_common.h"],"commits":["https://github.com/tensorflow/tensorflow/commit/a7c02f1a9bbc35473969618a09ee5f9f5d3e52d9","https://github.com/tensorflow/tensorflow/commit/c5b30379ba87cbe774b08ac50c1f6d36df4ebb7c"],"basis":"rarely changed file"}]}]}}