Description
PyTorch is a Python package that provides tensor computation. Prior to version 2.10.0, a vulnerability in PyTorch's `weights_only` unpickler allows an attacker to craft a malicious checkpoint file (`.pth`) that, when loaded with `torch.load(..., weights_only=True)`, can corrupt memory and potentially lead to arbitrary code execution. Version 2.10.0 fixes the issue.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| pytorch | pytorch | < 2.10.0 | — |
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 | — |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | pytorch | 2.2.2-11 | — |
| Azure Linux 2 (CBL-Mariner) | pytorch | 2.0.0-14 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | pytorch | < 2.10.0 | 2.10.0 | PYSEC-2026-1856 |
| PyPI | torch | < 2.10.0 | 2.10.0 | GHSA-63cw-57p8-fm3p |
Advisories 1
- WID-SEC-2026-0222 PyTorch: Schwachstelle ermöglicht Codeausführung BSI CERT-Bund (WID) · Jun 9, 2026