Skip to content
OpenAdvisories
Critical · 9.3 Public exploit CVE-2025-32434 BIT-pytorch-2025-32434EUVD-2025-11856GHSA-53q9-r3pm-6pq6PYSEC-2025-41

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

Published Apr 18, 2025 · Updated Dec 1, 2025 · Assigned by GitHub_M

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 products

VendorProductAffectedFixed
pytorch pytorch < 2.6.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 pytorch 2.6.0+dfsg-1 —
Debian 13 pytorch 2.6.0+dfsg-1 —
Debian 12 pytorch No fix yet —
Debian 11 pytorch 1.7.1-7+deb11u1 DLA-4389-1

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 pytorch 2.2.2-6 —
Azure Linux 2 (CBL-Mariner) pytorch 2.0.0-8 —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 4 repositories

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI torch < 2.6.0 2.6.0 GHSA-53q9-r3pm-6pq6

Advisories 2

References