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

Inspect INC-2025-32434 in Interactive Incidents & Cases Hub

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

Mapped defensive controls

Source citation records