PHP2Shell: Read our blog on the critical RCE vulnerabilities affecting 70% of the Internet

CVE-2022-41887: 
Python vulnerability analysis and mitigation

Overview

TensorFlow's tf.keras.losses.poisson function contains a vulnerability where it receives y_pred and y_true parameters that are passed through functor::mul in BinaryOp. When the resulting dimensions overflow an int32, TensorFlow crashes due to a size mismatch during broadcast assignment. This vulnerability was assigned CVE-2022-41887 and was discovered in versions prior to 2.11.0 (GitHub Advisory).

Technical details

The vulnerability occurs in the dimension handling within the binary operations implementation. The issue stems from a dimension type mismatch where the code was using int instead of Eigen::DenseIndex for dimension calculations. This becomes problematic when dealing with large tensor dimensions that can overflow a 32-bit integer during broadcast operations (TensorFlow Commit).

Impact

When exploited, this vulnerability causes TensorFlow to crash when processing tensors with dimensions large enough to trigger the integer overflow condition. This can lead to denial of service in applications using the affected TensorFlow versions. The practical impact is somewhat limited as successful exploitation requires operations with more than 2^32 elements, which would cause out-of-memory conditions on most machines (GitHub Advisory).

Exploitability

The vulnerability can be triggered by providing specific input tensors to the tf.keras.losses.poisson function. A proof of concept exists that demonstrates the issue using a tensor with shape [1, 2500000000] and specific prediction values (GitHub Advisory).

Mitigation and workarounds

The issue has been fixed in TensorFlow versions 2.9.3, 2.10.1, and 2.11.0. Users should upgrade to these patched versions. Note that the fix was not backported to TensorFlow 2.8.x due to incompatible changes in Eigen behavior between versions 2.8 and 2.9 (GitHub Advisory).

Additional resources


Source: This report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-cwm5-jh59-mwxrHIGH7.5
  • Python logoPython
  • twisted
NoYesOct 22, 2026
GHSA-53xc-49m8-p798HIGH7.5
  • Python logoPython
  • twisted
NoYesOct 22, 2026
GHSA-q7qq-6mhp-9rc4MEDIUM5.4
  • Python logoPython
  • twisted
NoYesOct 22, 2026
GHSA-2qrf-pqgx-qh9vMEDIUM4.9
  • Python logoPython
  • twisted
NoYesOct 22, 2026
GHSA-3476-c5c2-fr73LOWN/A
  • Python logoPython
  • twisted
NoYesOct 22, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management