PyTorch RCE via torch.load weights_only=True <2.6.0
CVE-2025-32434 Published on April 18, 2025

PyTorch: `torch.load` with `weights_only=True` leads to remote code execution
PyTorch is a Python package that provides tensor computation with strong GPU acceleration and deep neural networks built on a tape-based autograd system. In version 2.5.1 and prior, a Remote Command Execution (RCE) vulnerability exists in PyTorch when loading a model using torch.load with weights_only=True. This issue has been patched in version 2.6.0.

Github Repository NVD

Weakness Type

What is a Marshaling, Unmarshaling Vulnerability?

The application deserializes untrusted data without sufficiently verifying that the resulting data will be valid.

CVE-2025-32434 has been classified to as a Marshaling, Unmarshaling vulnerability or weakness.


Products Associated with CVE-2025-32434

stack.watch emails you whenever new vulnerabilities are published in Linux Foundation Pytorch or Pytorch. Just hit a watch button to start following.

 
 

Affected Versions

pytorch Version < 2.6.0 is affected by CVE-2025-32434

Vulnerable Packages

The following package name and versions may be associated with CVE-2025-32434

Package Manager Vulnerable Package Versions Fixed In
pip lmdeploy <= 0.11 0.11.1

Exploit Probability

EPSS
1.22%
Percentile
78.80%

EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.