CVE-2025-24357: vllm Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-rh4j-5rhw-hr54
CVSS 7.5
CWE-502
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2025-24357
GHSA Identifier GHSA-rh4j-5rhw-hr54
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product vllm
Package Ecosystem PyPI
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (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.

vllm fixed: 0.7.0
pip install vllm>=0.7.0
Verify Direct and Transitive Dependencies

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

### 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

CVE-2025-24357 Affected vllm Versions

1 component(s)
Fixed Versions:
0.7.0
Product / Package Ecosystem Affected Versions Fixed Version
vllm
PyPI
< 0.7.0
0.7.0

References

Frequently Asked Questions

What is CVE-2025-24357?
CVE-2025-24357 is a security vulnerability in vllm involving Malicious model to RCE by torch.load in hf_model_weights_iterator under CWE-502: Deserialization of Untrusted Data.
Which vllm versions are affected?
Affected versions include releases prior to 0.7.0 across affected packages: vllm.
What version fixes CVE-2025-24357?
Upgrading to 0.7.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is vllm affected?
Yes, vllm is affected in releases prior to 0.7.0. Upgrade your dependency to 0.7.0 or later.
What is the CVSS score of CVE-2025-24357?
CVE-2025-24357 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2025-24357?
CVE-2025-24357 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check PyPI dependencies for CVE-2025-24357?
Run the dependency tree command: 'pip show vllm'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}