CVE-2022-41887: TensorFlow: int32 overflow crashes Poisson loss function

HIGH PoC AVAILABLE CISA: TRACK*
Published November 18, 2022
CISO Take

Any TensorFlow deployment using Poisson loss in training or inference is remotely crashable with zero authentication and no ML expertise required—just a malformed tensor. Upgrade immediately to TF 2.11, 2.10.1, or 2.9.3; TF 2.8.x will not receive a backport. If patching is delayed, enforce hard tensor dimension limits at the API boundary before inputs reach the loss computation.

Risk Assessment

High severity DoS (CVSS 7.5, AV:N/AC:L/PR:N/UI:N). Trivially exploitable over the network with no privileges, making every exposed TF endpoint a viable target. Impact is limited to availability—no data exfiltration or code execution—but in production ML pipelines a repeated crash aborts training runs, risks checkpoint corruption, and violates SLAs. Not in CISA KEV and no confirmed active exploitation as of enrichment, but the attack surface is broad given TF's ubiquity in enterprise AI stacks.

Affected Systems

Package Ecosystem Vulnerable Range Patched
tensorflow pip No patch
195.0K OpenSSF 7.2 3.7K dependents Pushed today 4% patched ~1372d to patch Full package profile →

Do you use tensorflow? You're affected.

Severity & Risk

CVSS 3.1
7.5 / 10
EPSS
0.1%
chance of exploitation in 30 days
Higher than 33% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
Exploitation Confidence
medium
CISA SSVC: Public PoC
Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, CISA SSVC, EPSS, trickest/cve, and Nuclei templates.

Attack Surface

AV AC PR UI S C I A
AV Network
AC Low
PR None
UI None
S Unchanged
C None
I None
A High

Recommended Action

5 steps
  1. Patch: upgrade to TensorFlow 2.11, 2.10.1, or 2.9.3 (commit c5b30379).

  2. Input validation: reject inference requests where the product of tensor dimensions exceeds INT32_MAX before reaching any Keras loss function.

  3. Serving hardening: enforce maximum tensor shape limits in TF Serving, gRPC preprocessing, or API gateway middleware—framework-level memory limits alone do not block this path.

  4. Audit: inventory Docker/conda environments pinned to 2.9.x or 2.10.x without the patch applied.

  5. Detection: alert on abnormal TF process crashes or out-of-range tensor dimension values in inference request logs.

CISA SSVC Assessment

Decision Track*
Exploitation poc
Automatable No
Technical Impact partial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Art.15 - Accuracy, robustness and cybersecurity
ISO 42001
A.6.2.6 - AI system robustness and availability
NIST AI RMF
RES-1.1 - Resilience
OWASP LLM Top 10
LLM10:2025 - Unbounded Consumption

Frequently Asked Questions

What is CVE-2022-41887?

Any TensorFlow deployment using Poisson loss in training or inference is remotely crashable with zero authentication and no ML expertise required—just a malformed tensor. Upgrade immediately to TF 2.11, 2.10.1, or 2.9.3; TF 2.8.x will not receive a backport. If patching is delayed, enforce hard tensor dimension limits at the API boundary before inputs reach the loss computation.

Is CVE-2022-41887 actively exploited?

Proof-of-concept exploit code is publicly available for CVE-2022-41887, increasing the risk of exploitation.

How to fix CVE-2022-41887?

1. Patch: upgrade to TensorFlow 2.11, 2.10.1, or 2.9.3 (commit c5b30379). 2. Input validation: reject inference requests where the product of tensor dimensions exceeds INT32_MAX before reaching any Keras loss function. 3. Serving hardening: enforce maximum tensor shape limits in TF Serving, gRPC preprocessing, or API gateway middleware—framework-level memory limits alone do not block this path. 4. Audit: inventory Docker/conda environments pinned to 2.9.x or 2.10.x without the patch applied. 5. Detection: alert on abnormal TF process crashes or out-of-range tensor dimension values in inference request logs.

What systems are affected by CVE-2022-41887?

This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, inference endpoints.

What is the CVSS score for CVE-2022-41887?

CVE-2022-41887 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.13%.

Technical Details

NVD 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.

Exploitation Scenario

An adversary identifies a TensorFlow-backed model serving endpoint (via API docs, error response headers, or passive fingerprinting). They craft a gRPC or REST inference request containing `y_pred`/`y_true` tensors with shape dimensions whose broadcast product exceeds 2^31-1. When the Poisson loss function attempts to compute the BinaryOp multiplication, the int32 overflow triggers a fatal size mismatch and crashes the TF serving process. Repeated requests prevent process recovery, achieving a persistent DoS. No authentication token, prior access, or ML knowledge is required—the only prerequisite is knowing the endpoint exists.

Weaknesses (CWE)

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Timeline

Published
November 18, 2022
Last Modified
November 21, 2024
First Seen
November 18, 2022

Related Vulnerabilities