Skip to content
Submit incident
AII-1001-90219
ConfirmedA court, a regulator or the organization itself has stated the core facts, or the record cites a court or regulator source.Supporting sources are pending verification.

PyTorch torch.load remote code execution vulnerability with weights_only=True

A remote code execution vulnerability was discovered in PyTorch's torch.load function when used with the weights_only=True parameter, which had been documented as a secure way to load model weights. The vulnerability affects versions up to 2.5.1 and was patched in version 2.6.0.

17 April 2025 Β· PyTorch Β· Security and cyberattacks
17 April 2025
AII-1001-90219
Quick facts
Organization
PyTorch (subject)
Category
Security and cyberattacks
Date
17 April 2025
Drafted by
Raidu Incident Detection

What happened

A remote code execution (RCE) vulnerability was identified in PyTorch's torch.load function when called with weights_only=True. PyTorch documentation had considered this parameter setting to be safe for loading model weights, contrasting with the unsafe weights_only=False setting.

Reported impact

The vulnerability affects PyTorch versions up to 2.5.1 and allows remote code execution despite the weights_only=True security parameter being enabled.

Index analysis

The vulnerability undermines PyTorch's documented security recommendation that using torch.load with weights_only=True mitigates security issues commonly associated with loading untrusted model files.

Classification

Organization
PyTorch (subject)
Category
Security and cyberattacks
Harm status
Potential harm
Intent
Unknown
Timing
Unknown
AI systems
PyTorch

Sources and evidence

Sources not yet published

This record was researched and written by the Index from original reporting. Its sources are still being verified by an editor, and they are listed here once that check is complete. Until then the record carries no reviewer.

How sources are verifiedSuggest a source for this incident