CVE-2025-32434: PyTorch: `torch.load` with `weights_only=True` leads to remote code execution
(updated )
I found a Remote Command Execution (RCE) vulnerability in PyTorch. When loading model using torch.load with weights_only=True, it can still achieve RCE.
References
- github.com/advisories/GHSA-53q9-r3pm-6pq6
- github.com/pypa/advisory-database/tree/main/vulns/torch/PYSEC-2025-41.yaml
- github.com/pytorch/pytorch
- github.com/pytorch/pytorch/commit/8d4b8a920a2172523deb95bf20e8e52d50649c04
- github.com/pytorch/pytorch/security/advisories/GHSA-53q9-r3pm-6pq6
- nvd.nist.gov/vuln/detail/CVE-2025-32434
Code Behaviors & Features
Detect and mitigate CVE-2025-32434 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →