CVE-2022-35968: PYSEC-2026-940 - TensorFlow vulnerable to `CHECK` fail in `AvgPoolGrad`

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

TensorFlow's average pooling gradient operation (AvgPoolGrad) fails to properly validate input tensor dimensions, allowing an attacker to trigger a denial-of-service crash by supplying invalid input shapes. This can disrupt machine learning applications that rely on TensorFlow for training or inference.

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

Quick answers

Is CVE-2022-35968 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2022-35968 being exploited in the wild.
How severe is CVE-2022-35968?
Low severity, with a CVSS score of 3.1, published 7 July 2026.
Which products and versions are affected?
Google TensorFlow all versions before 2.7.2; 2.8.0; 2.9.0; tensorflow (PyPI) ECOSYSTEM:introduced=0,fixed=2.7.2,introduced=2.8.0,fixed=2.8.1,introduced=2.9.0,fixed=2.9.1; tensorflow-cpu (PyPI) ECOSYSTEM:introduced=0,fixed=2.7.2,introduced=2.8.0,fixed=2.8.1,introduced=2.9.0,fixed=2.9.1; tensorflow-gpu (PyPI) ECOSYSTEM:introduced=0,fixed=2.7.2,introduced=2.8.0,fixed=2.8.1,introduced=2.9.0,fixed=2.9.1.
Is there a fix for CVE-2022-35968?
Yes. tensorflow (PyPI): upgrade to 2.9.1 or later; tensorflow-cpu (PyPI): upgrade to 2.9.1 or later; tensorflow-gpu (PyPI): upgrade to 2.9.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2022-35968 attacked?
It is attacked over the network.
Am I affected by CVE-2022-35968?
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.9.1 or later
    pip install "tensorflow>=2.9.1"
  • tensorflow-cpu (PyPI): upgrade to 2.9.1 or later
    pip install "tensorflow-cpu>=2.9.1"
  • tensorflow-gpu (PyPI): upgrade to 2.9.1 or later
    pip install "tensorflow-gpu>=2.9.1"

Technical details

The vulnerability is a missing input validation bug (CWE-617) in the AvgPoolGrad operation of TensorFlow. The operation does not fully validate the orig_input_shape parameter before using it, causing an unhandled CHECK failure (assertion failure) that terminates the process. An attacker can trigger this by calling tf.raw_ops.AvgPoolGrad with a maliciously crafted orig_input_shape tensor containing invalid values (e.g., negative dimensions). The attack requires network access only if the TensorFlow model is exposed via a service; no authentication or user interaction is needed. The impact is denial of service through application crash. Patches have been released in TensorFlow 2.7.2, 2.8.1, 2.9.1, and 2.10.0.

Affected products

  • Google TensorFlow all versions before 2.7.2; 2.8.0; 2.9.0
  • Google TensorFlow CPU all versions before 2.7.2; 2.8.0; 2.9.0
  • Google TensorFlow GPU all versions before 2.7.2; 2.8.0; 2.9.0

Identifiers

  • CVE-2022-35968
  • GHSA-2475-53vw-vp25
  • PYSEC-2026-3083
  • PYSEC-2026-3263
  • PYSEC-2026-940

Timeline

  • 2022-09-16: disclosed: Vulnerability advisory published
  • 2022-09-16: patched: Fix committed in GitHub; patches released for TensorFlow 2.7.2, 2.8.1, 2.9.1, 2.10.0

References

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