PyTorch FractionalMaxPool2d Inconsistent Results Vulnerability

Vulnerability

A vulnerability in PyTorch versions prior to 2.7.0 allows for inconsistent output when using the torch.nn.FractionalMaxPool2d component with torch.compile(). This issue can lead to silent incorrectness in deep learning model results, potentially causing harmful decision-making based on the flawed outputs.

Impact

Exploitation of this vulnerability results in deep learning models producing incorrect results, which can lead to misguided decisions based on these faulty outputs.

Reproduction

The vulnerability can be reproduced by creating a PyTorch model that includes a FractionalMaxPool2d layer. After compiling the model with torch.compile() and applying it to input data, the output can be compared to the expected results. The inconsistency can be observed when the model is compiled with the Inductor backend, particularly when using random number generation operations.

Remediation

Users can upgrade to PyTorch version 2.7.0 or later, where this vulnerability has been fixed.

Added: Sep 25, 2025, 3:22 PM
Updated: Sep 25, 2025, 7:27 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
7.5
exploitability
7.7
remediation
7.7
relevance
0.6
threat
6.4
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.