CVE-2025-32434

PyTorch: `torch.load` with `weights_only=True` leads to remote code execution

State
Published
Severity
9.3 Critical
Published
Apr 18, 2025
Updated
Dec 1, 2025
Reserved
Apr 8, 2025

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
4.09.3 CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NGitHub_M

Weaknesses

  • CWE-502 Deserialization of Untrusted Data

Affected Products

ProductVersions
pytorchpytorch
  • < 2.6.0Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.