CVE-2025-32434: PyTorch: `torch.load` with `weights_only=True` leads to remote code execution

9.3 CVSS

Description

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.

Classification

CVE ID: CVE-2025-32434

CVSS Base Severity: CRITICAL

CVSS Base Score: 9.3

CVSS Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Problem Types

CWE-502: Deserialization of Untrusted Data

Affected Products

Vendor: pytorch

Product: pytorch

References

https://nvd.nist.gov/vuln/detail/CVE-2025-32434
https://github.com/pytorch/pytorch/security/advisories/GHSA-53q9-r3pm-6pq6

Timeline