AIIC AI Intelligence Centre

SOURCE-LINKED INTELLIGENCE

GHSA-53q9-r3pm-6pq6: PyTorch: `torch.load` with `weights_only=True` leads to remote code execution

OSV AI package advisories · observation · Apr 18, 2025 · UTC

# Description 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. # Background knowledge https://github.com/pytorch/pytorch/security As you can see, the PyTorch official documentation considers using `torch.load()` with `weights_only=True` to be safe. ![image](https://github.com/user-attachments/assets/fdaa8520-d66a-473a-ab1f-163d793de298) Since everyone knows that weights_only=False is unsafe, so they will use the weights_only=True to mitigate the seucirty issue. But now, I just proved that ev

Read original source ↗ Open in workspace

recordType
vulnerability
status
active
evidenceStatus
reported
region
Global

Evidence & attribution

First collected: 2026-09-19T20:26:51.628Z. This is not the publication date.