PyTorch: `torch.load` with `weights_only=True` leads to remote code execution
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-502.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| pytorch | pytorch | before 2.6.0 | 2.6.0 | Patch available | CNA |
| — | torch (PyPI) | before 2.6.0 | 2.6.0 | Patch available | GHSA-53q9-r3pm-6pq6 |
- pytorch Vendorpytorch Affected before 2.6.0 Fixed in 2.6.0 Patch available CNA
- torch (PyPI) Vendor— Affected before 2.6.0 Fixed in 2.6.0 Patch available GHSA-53q9-r3pm-6pq6
Remediation
- Fix · CNA pytorch (pytorch) Fixed in 2.6.0
- Fix · GHSA-53q9-r3pm-6pq6 torch (PyPI) Fixed in 2.6.0 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2025-32434
- 2026-10-03 Alias added: GHSA-53q9-r3pm-6pq6
References
Advisory 2
More pytorch vulnerabilities
- TI-2023-23379 TorchServe Server-Side Request Forgery CVSS 3.1CRITICAL 10.0
- TI-2026-86102 Predictable temp path in TorchServe enables local privilege escalation CVSS 3.1HIGH 7.8
- TI-2026-46956 PyTorch torchvision GIF Decoder Out-of-bounds Heap Read CVSS 4.0HIGH 7.1
- TI-2024-06099 Unclaimed S3 Bucket Usage in pytorch/serve CVSS 3.0MEDIUM 6.3
- TI-2024-23271 TorchServe gRPC Port Exposure CVSS 3.1HIGH 8.2
- TI-2024-23270 TorchServe bypass allowed_urls configuration CVSS 3.1CRITICAL 9.8
Sources
- CVE-2025-32434 · CVE Program
- CVE-2025-32434 · NVD
- FIRST EPSS
- GHSA-53q9-r3pm-6pq6 · GitHub Advisory Database · CC BY 4.0
- CVE-2025-32434 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences