Vulnerability · Published Apr 18, 2025 · Assigned by GitHub_M
CVE-2025-32434PyTorch: `torch.load` with `weights_only=True` leads to remote code execution
Critical 9.3
In plain English
A critical-severity unsafe deserialization in pytorch from pytorch. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.4% (higher than 84% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official description
PyTorch is a Python package that provides tensor computation with strong GPU acceleration and deep neural networks built on a tape-based autograd system. In version 2.5.1 and prior, a Remote Command Execution (RCE) vulnerability exists in PyTorch when loading a model using torch.load with weights_only=True. This issue has been patched in version 2.6.0.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | pytorch | no fix listed | DEBIAN-CVE-2025-32434 |
| Debian:13 | pytorch | 2.6.0+dfsg-1 | DEBIAN-CVE-2025-32434 |
| Debian:14 | pytorch | 2.6.0+dfsg-1 | DEBIAN-CVE-2025-32434 |
| PyPI | torch | 2.6.0 | GHSA-53q9-r3pm-6pq6 |
| PyPI | torch | 2.6.0 | PYSEC-2025-41 |
Affected products (as reported)
Weakness: CWE-502 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N