Advisory

GHSA-rh4j-5rhw-hr54

Also known as: CVE-2025-24357, PYSEC-2025-58

Summary

vllm: Malicious model to RCE by torch.load in hf_model_weights_iterator

Details

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

Severity

High Basis: The source's own band: HIGH

Dates

Published
2025-01-27 20:50 UTC
Modified
2026-08-07 08:12 UTC

Affected packages and fixes

vllm

PyPI · All systems

Affected

  • introduced 0, fixed 0.7.0 (ecosystem)

Fixed versions

0.7.0

Fix

  • Fixed version 0.7.0
    pip install --upgrade vllm==0.7.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences