CVE-2025-24357: vllm: Malicious model to RCE by torch.load in hf_model_weights_iterator
Description The vllm/modelexecutor/weightutils.py implements hfmodelweightsiterator to load the model checkpoint, which is downloaded from huggingface. It use torch.load function and weightsonly 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.
Published Jan 27, 2025 · Updated Jun 30, 2025
Affected packages
vllm
- Ecosystem
- PyPI
- Affected
- < 0.7.0
- Fixed in
- 0.7.0
- Check
pip show vllm
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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
- https://pytorch.org/docs/stable/generated/torch.load.html
- Fix: https://github.com/vllm-project/vllm/pull/12366
Credited to DogeWatch, russellb.
References
- https://github.com/vllm-project/vllm/security/advisories/GHSA-rh4j-5rhw-hr54
- https://nvd.nist.gov/vuln/detail/CVE-2025-24357
- https://github.com/vllm-project/vllm/pull/12366
- https://github.com/vllm-project/vllm/commit/d3d6bb13fb62da3234addf6574922a4ec0513d04
- https://github.com/vllm-project/vllm/releases/tag/v0.7.0
- https://pytorch.org/docs/stable/generated/torch.load.html
- https://github.com/pypa/advisory-database/tree/main/vulns/vllm/PYSEC-2025-58.yaml
- https://github.com/advisories/GHSA-rh4j-5rhw-hr54
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More vLLM vulnerabilities
All vLLM entriesCVE-2026-105752
vLLM: Harmony tool continuations drop `cache_salt` — restoring a cross-tenant prefix-cache membership oracle
low3.1Oct 6, 2026CVE-2026-105753
vLLM: Mirrored multimodal IPC caches desync after a rejected request — a later request reusing the same media hash trips a receiver assertion in the engine core
medium6.5Oct 6, 2026CVE-2026-105754
vLLM: Scale-out disaggregated multimodal transport trusts caller-supplied features
medium6.5Oct 5, 2026CVE-2026-105755
vLLM: Flash late-interaction scoring caches query embeddings under a caller-controlled request id — cross-request integrity break and induced errors on `/score` and `/rerank`
medium4.2Oct 5, 2026CVE-2026-105756
vLLM: Loose `cache_salt` validation lets a single request kill EngineCore on LMCache-MP deployments — uncaught downstream `ValueError` denial of service
medium6.5Oct 5, 2026CVE-2026-105757
vLLM: Structured-output request errors escape the request boundary and terminate the shared EngineCore — engine-fatal denial of service (3 sites)
medium6.5Oct 5, 2026
