Advisory

PYSEC-2025-202

Also known as: BIT-pytorch-2025-46153, CVE-2025-46153

Summary

The record has no summary.

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.

Severity

Medium Basis: CVSS v3 score 5.3, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Dates

Published
2025-09-25 15:16 UTC
Modified
2026-05-20 09:19 UTC

Affected packages and fixes

torch

PyPI · All systems

Affected

  • introduced 2.6.0, fixed 2.7.0 (ecosystem)

Fixed versions

2.7.0

Fix

  • Fixed version 2.7.0
    pip install --upgrade torch==2.7.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences