CVE-2022-41907: PYSEC-2026-945 - Overflow in `ResizeNearestNeighborGrad`

CVE-2022-41907 · Severity: low · CVSS 3.1 · Published 2026-07-07

TensorFlow's ResizeNearestNeighborGrad operation, a function used for image processing and gradient computation in machine learning, can crash when given extremely large input size parameters. An attacker with the ability to provide inputs to this function could cause a denial of service, disrupting machine learning inference or training pipelines that rely on it.

Technologies: Google TensorFlow, tensorflow (PyPI), tensorflow-cpu (PyPI), tensorflow-gpu (PyPI). Vendors: Google, PyPI.

Quick answers

Is CVE-2022-41907 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2022-41907 being exploited in the wild.
How severe is CVE-2022-41907?
Low severity, with a CVSS score of 3.1, published 7 July 2026.
Which products and versions are affected?
Google TensorFlow versions before 2.8.4; 2.9.0–2.9.2; 2.10.0; tensorflow (PyPI) ECOSYSTEM:introduced=0,fixed=2.8.4,introduced=2.9.0,fixed=2.9.3,introduced=2.10.0,fixed=2.10.1; tensorflow-cpu (PyPI) ECOSYSTEM:introduced=0,fixed=2.8.4,introduced=2.9.0,fixed=2.9.3,introduced=2.10.0,fixed=2.10.1; tensorflow-gpu (PyPI) ECOSYSTEM:introduced=0,fixed=2.8.4,introduced=2.9.0,fixed=2.9.3,introduced=2.10.0,fixed=2.10.1.
Is there a fix for CVE-2022-41907?
Yes. tensorflow (PyPI): upgrade to 2.10.1 or later; tensorflow-cpu (PyPI): upgrade to 2.10.1 or later; tensorflow-gpu (PyPI): upgrade to 2.10.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2022-41907 attacked?
It is attacked over the network.
Am I affected by CVE-2022-41907?
Check whether you run Google TensorFlow, tensorflow (PyPI), tensorflow-cpu (PyPI) or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • tensorflow (PyPI): upgrade to 2.10.1 or later
    pip install "tensorflow>=2.10.1"
  • tensorflow-cpu (PyPI): upgrade to 2.10.1 or later
    pip install "tensorflow-cpu>=2.10.1"
  • tensorflow-gpu (PyPI): upgrade to 2.10.1 or later
    pip install "tensorflow-gpu>=2.10.1"

Technical details

The vulnerability is an integer overflow in TensorFlow's tf.raw_ops.ResizeNearestNeighborGrad function when processing large size input values. The vulnerable code is in the resize_nearest_neighbor_op.cc kernel implementation. An attacker who can call this raw operation (typically requires local or network access to a TensorFlow service) can supply specially crafted large integer size parameters that trigger the overflow and cause an application crash (denial of service). Patches were released in TensorFlow versions 2.8.4, 2.9.3, 2.10.1, and 2.11.0. All earlier versions are affected.

Affected products

  • Google TensorFlow versions before 2.8.4; 2.9.0–2.9.2; 2.10.0
  • Google TensorFlow CPU versions before 2.8.4; 2.9.0–2.9.2; 2.10.0
  • Google TensorFlow GPU versions before 2.8.4; 2.9.0–2.9.2; 2.10.0

Identifiers

  • CVE-2022-41907
  • GHSA-368v-7v32-52fx
  • PYSEC-2026-3091
  • PYSEC-2026-3268
  • PYSEC-2026-945

Timeline

  • 2022-11-18: disclosed: Published on NVD
  • 2022-11-21: disclosed: Published on GitHub Security Advisory
  • 2022-11-21: patched: Patches released in TensorFlow 2.8.4, 2.9.3, 2.10.1, and 2.11.0

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.