Description
PyTorch torchvision through 0.28.0, fixed in commit 4e05dc2, contains an out-of-bounds heap read vulnerability in the GIF decoder's read_from_tensor callback that passes unclamped length to memcpy. Attackers can supply malicious or truncated GIF files to cause denial of service via segmentation fault or disclose adjacent heap memory contents.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| pytorch | vision | ≤ 0.28.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-vision | No fix yet | — |
| Debian 13 | pytorch-vision | No fix yet | — |
| Debian 12 | pytorch-vision | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | pytorch +1 | No fix yet | — |
| Ubuntu 26.04 LTS | pytorch | No fix yet | — |
| Ubuntu 22.04 LTS | pytorch +1 | No fix yet | — |
Advisories 1
- WID-SEC-2026-2499 PyTorch: Schwachstelle ermöglicht Denial of Service und Offenlegung von Informationen BSI CERT-Bund (WID) · Jul 23, 2026
References
- Researcher Disclosure technical-description exploit issue-tracking
- Pull Request issue-tracking patch
- Patch Commit patch
- https://www.vulncheck.com/advisories/pytorch-torchvision-gif-decoder-out-of-bounds-heap-read third-party-advisory