CVE-2025-24357
JSON

7.5high

vLLM allows a malicious model RCE by torch.load in hf_model_weights_iterator

Severity
7.5high CVSS:3.1 by GitHub_M
Exploit likelihood
0.89% (higher than 60% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-rh4j-5rhw-hr54PYSEC-2025-58

Description

vLLM is a library for LLM inference and serving. vllm/model_executor/weight_utils.py implements hf_model_weights_iterator to load the model checkpoint, which is downloaded from huggingface. It uses the torch.load function and the weights_only parameter defaults to False. When torch.load loads malicious pickle data, it will execute arbitrary code during unpickling. This vulnerability is fixed in v0.7.0.

Affected

Product or packageVersionsReported by
vllm-project vllm< 0.7.0CVE List
vllm (PyPI)before 0.7.0, before d3d6bb13fb62da3234addf6574922a4ec0513d04GitHub Advisory Database, PyPA Advisory Database
vllm vllmbefore 0.7.0NVD

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
PyPA Advisory Database8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Classification

CWE-502

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

vLLM is a library for LLM inference and serving. vllm/model_executor/weight_utils.py implements hf_model_weights_iterator to load the model checkpoint, which is downloaded from huggingface. It uses the torch.load function and the weights_only parameter defaults to False. When torch.load loads malicious pickle data, it will execute arbitrary code during unpickling. This vulnerability is fixed in v0.7.0.

GitHub Advisory Database
Description

The vllm/model_executor/weight_utils.py implements hf_model_weights_iterator to load the model checkpoint, which is downloaded from huggingface. It use torch.load function and weights_only parameter is default value False. There is a security warning on https://pytorch.org/docs/stable/generated/torch.load.html, when torch.load load a malicious pickle data it will execute arbitrary code during unpickling.

Impact

This vulnerability can be exploited to execute arbitrary codes and OS commands in the victim machine who fetch the pretrained repo remotely.

Note that most models now use the safetensors format, which is not vulnerable to this issue.

References
NVD (es)

vLLM es una librería para la inferencia y el servicio de LLM. vllm/model_executor/weight_utils.py implementa hf_model_weights_iterator para cargar el punto de control del modelo, que se descarga desde huggingface. Utiliza la función Torch.load y el parámetro weights_only tiene el valor predeterminado Falso. Cuando Torch.load carga datos pickle maliciosos, ejecutará código arbitrario durante el desensamblaje. Esta vulnerabilidad se corrigió en la versión v0.7.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-24357 changed 2025-02-12CVE Terms of Use
GitHub Advisory DatabaseGHSA-rh4j-5rhw-hr54 changed 2026-08-07CC-BY-4.0
NVDCVE-2025-24357 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2025-58 changed 2025-06-27CC-BY-4.0