CVE-2025-24357: vllm Remote Code Execution Vulnerability
HIGHCVE-2025-24357 is a HIGH (CVSS 7.5) remote code execution vulnerability (CWE-502: Deserialization of Untrusted Data) affecting vllm libraries in the PyPI ecosystem. The issue involves malicious model to rce by torch.load in hf_model_weights_iterator. Remediation is available by upgrading affected packages to version 0.7.0.
CVE-2025-24357 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2025-24357
To remediate this vulnerability, upgrade all affected vllm dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install vllm>=0.7.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show vllm
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-24357, inspect your installed packages using pip:
pip show vllm
Analyze the terminal output to locate any version of vllm in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.7.0), your application is affected.
Note: The pip show vllm command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In vllm, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-24357 Affected vllm Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
vllm
|
PyPI |
< 0.7.0
|
0.7.0
|
References
Frequently Asked Questions
What is CVE-2025-24357?
Which vllm versions are affected?
What version fixes CVE-2025-24357?
Is vllm affected?
What is the CVSS score of CVE-2025-24357?
What CWE is associated with CVE-2025-24357?
How can I check PyPI dependencies for CVE-2025-24357?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rh4j-5rhw-hr54",
"modified" : "2025-06-30T12:52:27Z",
"published" : "2025-01-27T20:50:30Z",
"aliases" : [ "CVE-2025-24357" ],
"summary" : "vllm: Malicious model to RCE by torch.load in hf_model_weights_iterator",
"details" : "### Description\nThe 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.\n\n### Impact\nThis vulnerability can be exploited to execute arbitrary codes and OS commands in the victim machine who fetch the pretrained repo remotely.\n\nNote that most models now use the safetensors format, which is not vulnerable to this issue.\n\n### References\n* https://pytorch.org/docs/stable/generated/torch.load.html\n* Fix: https://github.com/vllm-project/vllm/pull/12366",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "vllm"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.7.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/vllm-project/vllm/security/advisories/GHSA-rh4j-5rhw-hr54"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-24357"
}, {
"type" : "WEB",
"url" : "https://github.com/vllm-project/vllm/pull/12366"
}, {
"type" : "WEB",
"url" : "https://github.com/vllm-project/vllm/commit/d3d6bb13fb62da3234addf6574922a4ec0513d04"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/vllm/PYSEC-2025-58.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/vllm-project/vllm"
}, {
"type" : "WEB",
"url" : "https://github.com/vllm-project/vllm/releases/tag/v0.7.0"
}, {
"type" : "WEB",
"url" : "https://pytorch.org/docs/stable/generated/torch.load.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-502" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-01-27T20:50:30Z",
"nvd_published_at" : "2025-01-27T18:15:41Z"
}
}