logo

CVE-2025-32434 torch

Package

Manager: pip
Name: torch
Vulnerable Version: >=0 <2.6.0

Severity

Level: Critical

CVSS v3.1: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N/E:P/RL:O/RC:C

CVSS v4.0: 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

EPSS: 0.00432 pctl0.61813

Details

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. ![image](https://github.com/user-attachments/assets/fdaa8520-d66a-473a-ab1f-163d793de298) 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.

Metadata

Created: 2025-04-18T15:19:28Z
Modified: 2025-08-29T19:45:46Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/04/GHSA-53q9-r3pm-6pq6/GHSA-53q9-r3pm-6pq6.json
CWE IDs: ["CWE-502"]
Alternative ID: GHSA-53q9-r3pm-6pq6
Finding: F096
Auto approve: 1