Every CVE Search/ Get API key

CVE-2025-32434

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

9.3 CriticalPublic exploitFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

2.37%Up 2.1 points since Apr 19, 2025
90%50%10%1%

What each source reports

CVE List Score used 9.3

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.

Record
CVE-2025-32434
CVSS 4.0
9.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:N
Weakness
CWE-502
Updated
2026-11-02
EUVDEUVD-2025-11856 9.3

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.

Record
EUVD-2025-11856
CVSS 4.0
9.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:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-53q9-r3pm-6pq6 9.3

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

Description

I found a Remote Command Execution (RCE) vulnerability in PyTorch. When loading model using torch.load with weights_only=True, it can still achieve RCE.

Background knowledge

https://github.com/pytorch/pytorch/security As you can see, the PyTorch official documentation considers using torch.load() with weights_only=True to be safe. Since everyone knows that weights_only=False is unsafe, so they will use the weights_only=True to mitigate the seucirty issue. But now, I just proved that even if you use weights_only=True, it can still achieve RCE.

Credit

This vulnerability was found by Ji'an Zhou.

Record
GHSA-53q9-r3pm-6pq6
CVSS 4.0
9.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:N
Weakness
CWE-502
Updated
2026-11-02
NVD 9.3

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.

Record
CVE-2025-32434
CVSS 4.0
9.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:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-502
Updated
2026-11-02
OSVAZL-60877 9.8

CVE-2025-32434 affecting package pytorch for versions less than 2.2.2-6

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.

Record
AZL-60877
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-05
OSVAZL-60880 9.8

CVE-2025-32434 affecting package pytorch for versions less than 2.0.0-8

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.

Record
AZL-60880
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
Show 6 moreShow less
OSV 9.3

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.

Record
CVE-2025-32434
CVSS 4.0
9.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:N
Weakness
CWE-502
Updated
2026-11-02
OSVDEBIAN-CVE-2025-32434 9.8

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.

Record
DEBIAN-CVE-2025-32434
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVGHSA-53q9-r3pm-6pq6 9.3

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

Description

I found a Remote Command Execution (RCE) vulnerability in PyTorch. When loading model using torch.load with weights_only=True, it can still achieve RCE.

Background knowledge

https://github.com/pytorch/pytorch/security As you can see, the PyTorch official documentation considers using torch.load() with weights_only=True to be safe. Since everyone knows that weights_only=False is unsafe, so they will use the weights_only=True to mitigate the seucirty issue. But now, I just proved that even if you use weights_only=True, it can still achieve RCE.

Credit

This vulnerability was found by Ji'an Zhou.

Record
GHSA-53q9-r3pm-6pq6
CVSS 4.0
9.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:N
Weakness
CWE-502
Updated
2026-11-02
OSVPYSEC-2025-41 9.8

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.

Record
PYSEC-2025-41
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVBIT-pytorch-2025-32434 No score

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.

Record
BIT-pytorch-2025-32434
Updated
2026-11-02
OSVCLSA-2025-1760660047 No score

TuxCare security update for torch (1 CVE)

TuxCare rebuilt torch to address 1 CVE. Fixed in 1.13.1.post1+tuxcare.

Record
CLSA-2025-1760660047
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
torch
PyPI
before 2.6.0
2.6.0
pytorch
Azure Linux:3
before 2.2.2-6
2.2.2-6
pytorch
Azure Linux:2
before 2.0.0-8
2.0.0-8
pytorch
Bitnami
before 2.6.0
2.6.0
torch
TuxCare:PyPI
1.13.1 up to 1.13.1.post1+tuxcare
1.13.1.post1+tuxcare
pytorch
Debian:12
All versions, plus listed versions
1.13.1+dfsg-41.13.1+dfsg-52.0.1+dfsg-12.0.1+dfsg-1~exp12.0.1+dfsg-2
Show 33 moreShow less
2.0.1+dfsg-42.0.1+dfsg-52.1.2+dfsg-12.1.2+dfsg-22.1.2+dfsg-42.12.0+dfsg2-12.12.0+dfsg2-1~exp12.12.0+dfsg2-1~exp22.12.0+dfsg2-22.12.0+dfsg2-32.12.0+dfsg2-42.12.1+dfsg-12.4.1-12.4.1-32.4.1-42.5.0+dfsg-12.5.1+dfsg-12.5.1+dfsg-32.5.1+dfsg-42.6.0+dfsg-12.6.0+dfsg-1~exp12.6.0+dfsg-22.6.0+dfsg-32.6.0+dfsg-42.6.0+dfsg-52.6.0+dfsg-72.6.0+dfsg-82.6.0+dfsg-92.6.0~rc9+dfsg-1~exp12.9.0+dfsg-1~exp12.9.0+dfsg-1~exp22.9.1+dfsg-1~exp12.9.1+dfsg-1~exp2
None known
pytorch
Debian:13
before 2.6.0+dfsg-1
2.6.0+dfsg-1
pytorch
Debian:14
before 2.6.0+dfsg-1
2.6.0+dfsg-1
pytorch
Debian:11
before 1.7.1-7+deb11u1, plus listed versions
1.7.1-7
1.7.1-7+deb11u1
torch
PyPI
before 2.6.0, plus listed versions
1.0.01.0.11.1.01.10.01.10.1
Show 33 moreShow less
1.10.21.11.01.12.01.12.11.13.01.13.11.2.01.3.01.3.11.4.01.5.01.5.11.6.01.7.01.7.11.8.01.8.11.9.01.9.12.0.02.0.12.1.02.1.12.1.22.2.02.2.12.2.22.3.02.3.12.4.02.4.12.5.02.5.1
2.6.0

Public exploits

Links only. Every CVE stores no exploit code.

Public exploits
SourceLinkDate
PoC in GitHubcyhe50/cve-2025-32434-poc2025-11-13
PoC in GitHubB1tBit/CVE-2025-32434-exploit2025-12-15
PoC in GitHubSoildworks/Agentic-CLIP-Benchmark2026-03-08
PoC in GitHubAlexanderGumeniuk/CVE-2025-324342026-06-30

History

History
RecordedChangedSources
exploits, factsOSV
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV, PoC in GitHub

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2025-32434 is a critical vulnerability (CVSS 9.3) in Linuxfoundation Pytorch, published April 18, 2025. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 2.37%, the 83rd percentile. Fixed in torch 2.6.0.

References

MoveEnter Open