Vulnerability · Published Apr 18, 2025 · Assigned by GitHub_M

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

Critical 9.3

In plain English

A critical-severity unsafe deserialization in pytorch from pytorch. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.4% (higher than 84% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)9.3Critical
Exploit odds (30 days)2.4%top 16.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack tooling1Public PoC

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12pytorchno fix listedDEBIAN-CVE-2025-32434
Debian:13pytorch2.6.0+dfsg-1DEBIAN-CVE-2025-32434
Debian:14pytorch2.6.0+dfsg-1DEBIAN-CVE-2025-32434
PyPItorch2.6.0GHSA-53q9-r3pm-6pq6
PyPItorch2.6.0PYSEC-2025-41

Affected products (as reported)

VendorProductVersions
pytorch pytorch < 2.6.0

Weakness: CWE-502 · 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

References