Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-53q9-r3pm-6pq6

Опубликовано: 18 апр. 2025
Источник: github
Github: Прошло ревью
CVSS4: 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. image 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.

Пакеты

Наименование

torch

pip
Затронутые версииВерсия исправления

<= 2.5.1

2.6.0

Наименование

pytorch

pip
Затронутые версииВерсия исправления

<= 2.5.1

Отсутствует

EPSS

Процентиль: 54%
0.0032
Низкий

9.3 Critical

CVSS4

Дефекты

CWE-502

Связанные уязвимости

CVSS3: 9.8
ubuntu
2 месяца назад

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.

CVSS3: 9.8
nvd
2 месяца назад

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.

CVSS3: 9.8
msrc
около 2 месяцев назад

Описание отсутствует

CVSS3: 9.8
debian
2 месяца назад

PyTorch is a Python package that provides tensor computation with stro ...

CVSS3: 9.8
fstec
7 месяцев назад

Уязвимость функции torch.load() фреймворка машинного обучения PyTorch, позволяющая нарушителю выполнить произвольный код

EPSS

Процентиль: 54%
0.0032
Низкий

9.3 Critical

CVSS4

Дефекты

CWE-502