Documented Incident · INC-2025-32434 · Critical severity
PyTorch torch.load(weights_only=True) Safety Bypass Remote Code Execution
CVE-2025-32434 (CVSS 9.3, published April 18, 2025) shattered a widely relied-upon ML security assumption by bypassing `torch.load(..., weights_only=True)` in PyTorch versions `<= 2.5.1`. Security teams had adopted `weights_only=True` to safely load external `.pt` checkpoints without executing embedded Python pickle code, yet researchers found crafted TorchScript/legacy archive structures that still triggered arbitrary code execution during deserialization. Any ML pipeline loading community PyTorch checkpoints on vulnerable builds remained exposed to workstation and CI compromise. PyTorch 2.6.0 remediated the loader bypass and reinforced migration to `safetensors`.
Incident dossier metadata
- Case ID
INC-2025-32434- Classification
- Incident
- Date
- Severity
- Critical
- Sector
- Cloud & AI Infrastructure
- Attack vector
- Supply Chain
- System type
- Deep Learning Training & Checkpoint Loaders
- CVE / reference
CVE-2025-32434- Reference URI
https://nvd.nist.gov/vuln/detail/CVE-2025-32434
Defensive takeaway
Upgrade PyTorch to 2.6.0+, migrate model storage formats to memory-safe safetensors, and never rely solely on weights_only=True as a substitute for artifact verification.
Mapped AI security techniques
- Supply Chain Compromise: Model Repository AML.T0010.003
- User Execution: Unsafe AI Artifacts AML.T0011.000
- Manipulate AI Model: Embed Malware AML.T0018.002
- Publish Poisoned AI Artifacts: Models AML.T0115.001
Mapped defensive controls
- Restrict Library Loading AML.M0011
- Verify AI Artifacts AML.M0014
- Vulnerability Scanning AML.M0016
- AI Model Distribution Methods AML.M0017
Source citation records
- NVD Record CVE-2025-32434: PyTorch torch.load weights_only=True Bypass RCE · NIST National Vulnerability Database (NVD) ·