VDB
KO
MEDIUM 5.3

PYSEC-2025-202

Details

PyTorch before 3.7.0 has a bernoulli_p decompose function in decompositions.py even though it lacks full consistency with the eager CPU implementation, negatively affecting nn.Dropout1d, nn.Dropout2d, and nn.Dropout3d for fallback_random=True.

Are you affected?

Enter the version of the package you're using.

Affected packages

PyPI / torch
Introduced in: 2.6.0 Fixed in: 2.7.0
Fix pip install --upgrade 'torch>=2.7.0'

References