Description
A buffer overflow occurs in pytorch v2.7.0 when a PyTorch model consists of torch.nn.Conv2d, torch.nn.functional.hardshrink, and torch.Tensor.view-torch.mv() and is compiled by Inductor, leading to a Denial of Service (DoS).
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | pytorch | 2.12.0+dfsg2-1 | — |
| Debian 13 | pytorch | No fix yet | — |
| Debian 12 | pytorch | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | pytorch | No fix yet | — |
| Ubuntu 26.04 LTS | pytorch | No fix yet | — |
| Ubuntu 25.10 | pytorch | No fix yet | — |
| Ubuntu 22.04 LTS | pytorch | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | torch | < 2.7.1 | 2.7.1 | PYSEC-2025-208 |
Advisories 1
- WID-SEC-2025-2139 PyTorch: Mehrere Schwachstellen BSI CERT-Bund (WID) · Sep 25, 2025