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 package | Versions | Reported by |
|---|---|---|
| vllm-project vllm | < 0.7.0 | CVE List |
| vllm (PyPI) | before 0.7.0, before d3d6bb13fb62da3234addf6574922a4ec0513d04 | GitHub Advisory Database, PyPA Advisory Database |
| vllm vllm | before 0.7.0 | NVD |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| PyPA Advisory Database | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Classification
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
| https://github.com/vllm-project/vllm/security/advisories/GHSA-rh4j-5rhw-hr54 | advisory, vendor-advisory, web | |
| https://github.com/vllm-project/vllm/pull/12366 | issue-tracking, patch, report, web | |
| https://github.com/vllm-project/vllm/commit/d3d6bb13fb62da3234addf6574922a4ec0513d04 | fix, patch, web | |
| https://pytorch.org/docs/stable/generated/torch.load.html | technical-description, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2025-24357 | advisory | |
| https://github.com/pypa/advisory-database/tree/main/vulns/vllm/PYSEC-2025-58.yaml | web | |
| https://github.com/vllm-project/vllm | package | |
| https://github.com/vllm-project/vllm/releases/tag/v0.7.0 | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-24357 changed 2025-02-12 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-rh4j-5rhw-hr54 changed 2026-08-07 | CC-BY-4.0 |
| NVD | CVE-2025-24357 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2025-58 changed 2025-06-27 | CC-BY-4.0 |