Description
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.
Affected products
linuxfoundation: pytorch
References5
- github.com/pytorch/pytorch/pull/143460 Issue TrackingPatch
- gist.github.com/shaoyuyoung/4bcefba4004f8271e64b5185c95a248a Third Party Advisory
- gist.github.com/shaoyuyoung/e636f2e7a306105b7e96809e2b85c28a Third Party Advisory
- github.com/pytorch/pytorch/compare/v2.6.0...v2.7.0 Product
- github.com/pytorch/pytorch/issues/142853 Issue Tracking
Metrics
- CVSS 3.1
-
5.3
MEDIUM
Score source: CNA
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - EPSS — exploit probability
- 0% percentile: 36 · as of 9 November 2026
- CWE
- CWE-1176
Could this be exploited in your environment?
A patch closes the known hole. A penetration test shows what an attacker can still reach — with proof.