vLLM loads untrusted model files and runs code from them

CriticalSE Fix-First Score 51/100GHSA-ggpf-24jw-3fcwSE-AIV-01052Unsafe loading of model or data filesModel serving and inferenceMade public 23 Apr 2025

Download as PDF

What this means

An attacker who provides a malicious model file can run any code on the machine running vLLM. This means they can steal data, modify outputs, install malware, or take over the entire system. Any company using vLLM to load models from untrusted sources is at risk.

SecurityElites Manager Brief: the decision in one minute

vLLM can be tricked into running malicious code hidden inside model files. The last fix did not work because it relied on a protection in PyTorch that was not effective before version 2.6.0. You need to upgrade vLLM to 0.8.0 and PyTorch to 2.6.0 or later immediately if you are running any earlier versions.

SecurityElites Fix-First Score51 of 100
Our own ranking of what to fix first. Real attacks count most, then the chance of attack, then severity.
SecurityElites fix windowWithin 7 days
Critical severity. This is our suggestion from common practice; your own policy comes first.
Who should own the fixPlatform engineering or ML infrastructure team.
Likely effortAbout 30 minutes to 2 hours per deployment: upgrading vLLM to 0.8.0 and PyTorch to 2.6.0 or later, testing that models still load correctly, then restarting services. Longer if you have many services or if model loading fails and you need to investigate.

Questions to ask your team or supplier

  • Do we load models from untrusted sources, or only from official repositories? If untrusted sources, can we restrict that?
  • What is our process for updating Python packages in production, and how quickly can we roll out vLLM 0.8.0 and PyTorch 2.6.0?
  • Do we have system monitoring and logs that would catch unusual process creation or file access during model loading?

Message you can forward to the owning team

Security notice: vLLM loads untrusted model files and runs code from them (GHSA-ggpf-24jw-3fcw)

Severity: Critical
SecurityElites Fix-First Score: 51 of 100
SecurityElites fix window: Within 7 days
Action: upgrade to vllm 0.8.0 or later.
What we need from you: confirm whether we run this software, who owns it, and the date it will be fixed.
Full guide: https://securityelites.com/ai-vulnerabilities/ghsa-ggpf-24jw-3fcw-vllm-loads-untrusted-model-files-and-runs-code-from/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01052

What is at stake in your AI setup

  • Model files: attacker can read, modify, or replace models before they are loaded.
  • Keys for AI providers: attacker can steal API keys stored in memory or configuration.
  • Tools and systems the vLLM agent is connected to: attacker can abuse connections to call external services, modify data, or move laterally.
  • Compute bill: attacker can run expensive operations or fork processes, inflating cloud costs.

Map where your company uses AI

Who is exposed

  • Teams running vLLM 0.7.x or earlier to serve large language models.
  • Services that load models from external sources or user-provided files.
  • Systems where untrusted users can upload or point to model files.
  • Any vLLM deployment that has not explicitly upgraded PyTorch to 2.6.0 or later.

Upgrades you need

SoftwareAffected versionsMove to
vllm
PyPI
Every version before 0.8.00.8.0 or later

Am I affected?

Enter the version you run. Nothing you type is stored.

SecurityElites Developer Brief: the technical picture

Where the attacker must beAnywhere that can reach it over a network, including the internet if it is exposed
Account neededNone. No login is needed
Does a person have to do somethingNo. It works without anyone clicking or opening anything
How hard it is to doEasy. It works reliably once the attacker can reach it
Risk of: data being readHigh
Risk of: data or settings being changedHigh
Risk of: the service being taken downHigh

Read from the official severity rating: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Kind of coding mistake

  • CWE-1395

Where it sits in the standards

OWASP Top 10 for LLM Applications 2025: LLM03 Supply Chain (unsafe model and data files)

If you cannot upgrade today

  • Until you can upgrade, only load model files from official, trusted sources (such as official Hugging Face repositories) and never load user-provided or external models.
  • Restrict file and network access for the vLLM process using system tools (containers, seccomp, AppArmor, SELinux) to limit what an attacker can do if code is executed.
  • If possible, run vLLM in a sandboxed container with minimal privileges and no access to sensitive data or systems.

Signs it may already have been used against you

  • Check vLLM and system logs for model loading errors or unexpected behavior between the last model load and the upgrade date.
  • Look for new child processes spawned during model loading, especially if they access files, network, or write to disk.
  • Search for failed or slow model loading requests that coincide with times when untrusted or new models were added.
  • Review system resource usage (CPU, memory, network) around model load times; unexpected spikes may indicate code execution.

SecurityElites Fix Guide: step by step

  1. Find where vLLM is installed and what version of PyTorch it usesRun `pip show vllm` and `pip show torch` to see the installed versions. Note both version numbers. If vLLM is running in a container or virtual environment, check inside that environment.
  2. Check if you are running vLLM version 0.8.0 or laterIf the vLLM version shown is 0.8.0 or later and PyTorch is 2.6.0 or later, your system is not affected. Stop here. Otherwise, continue.
  3. Identify which models are loaded and where they come fromList all models currently served by vLLM and note whether they come from official sources (Hugging Face official repo), internal storage, or external/user-provided sources. Models from untrusted sources are highest risk.
  4. Upgrade vLLM to version 0.8.0Run `pip install --upgrade vllm==0.8.0`. If using a container, update the Dockerfile or image definition and rebuild. If using a requirements file, update it to `vllm==0.8.0` and reinstall.
  5. Upgrade PyTorch to version 2.6.0 or laterRun `pip install --upgrade torch>=2.6.0`. Depending on your GPU and system, you may need to also upgrade `torch-cuda` or other torch packages. Check PyTorch's official installation guide for your setup.
  6. Test that models load correctly after the upgradeStart vLLM and load one or two of your most critical models. Send a test query to each and confirm the output is correct and latency is acceptable.
  7. Check for signs that a malicious model was loaded before the fixReview system logs, process logs, and vLLM logs from before the upgrade date for unexpected child processes, file writes, network connections, or errors during model loading. If you find signs of exploitation, isolate the affected system and investigate further.
  8. Restart all vLLM servicesRestart each vLLM service or container to ensure they are running the new versions. Confirm they come online and serve requests normally.

How to confirm it is fixed: Confirm that `pip show vllm` reports version 0.8.0 or later and `pip show torch` reports version 2.6.0 or later.

SecurityElites Quick Fixes: copy and paste

Upgrade vllm with pipupgrade

pip install --upgrade "vllm>=0.8.0"
pip show vllm | grep Version

Pin it in requirements.txtupgrade

vllm>=0.8.0

Check vLLM and PyTorch versionsfor this issue

pip show vllm | grep Version
pip show torch | grep Version

Load PyTorch weights without running codegeneral hardening

import torch
state = torch.load("model.pt", weights_only=True)

Load safetensors weightsgeneral hardening

from safetensors.torch import load_file
state = load_file("model.safetensors")

Test in a non-production environment first. General hardening examples use placeholder names and ports; change them to match your setup.

Let your AI coding assistant do the upgrade

Paste this into the coding assistant you already use, inside the project. It checks first and asks before it changes anything.

Instruction for your coding assistant

You are helping me fix a security vulnerability (GHSA-ggpf-24jw-3fcw) in this project.\n\n1. Search the whole repository, including lock files, container files and CI configuration, for these packages and list every place they are pinned or installed:\n   - vllm (PyPI): must be 0.8.0 or later
2. Tell me which version we use now and whether it is affected. Stop and ask me before changing anything.
3. After I agree, raise each one to the safe version, update the lock files, and keep every other dependency as it is.
4. Run the tests and tell me what failed.
5. Give me a short summary of the files you changed that I can put in the pull request.

SecurityElites Incident Drill: could your team handle this?

Four questions to ask in your next team meeting. If any has no clear answer, that is the gap to close.

What versions of vLLM and PyTorch do we need to be safe from this vulnerability?A good answer: vLLM 0.8.0 or later and PyTorch 2.6.0 or later.
What can an attacker do if they get a malicious model loaded into vLLM?A good answer: They can run code with the same privileges as the vLLM process, which could let them steal data, change results, or compromise the entire system.
Why does the previous fix (weights_only=True) not work?A good answer: PyTorch versions before 2.6.0 did not properly implement the weights_only protection, so the malicious code could still run.
What is the first step to check if we are vulnerable?A good answer: Run `pip show vllm` and `pip show torch` to check the installed versions and compare them to 0.8.0 and 2.6.0.

Run a full timed drill with your team

Ticket for your backlog

Paste into Jira, GitHub Issues or any tracker that reads Markdown.

Ready-made ticket

## vLLM loads untrusted model files and runs code from them (GHSA-ggpf-24jw-3fcw)

**Severity:** Critical  |  **SE Fix-First Score:** 51/100  |  **Fix window:** Within 7 days
**Record:** SE-AIV-01052 https://securityelites.com/ai-vulnerabilities/ghsa-ggpf-24jw-3fcw-vllm-loads-untrusted-model-files-and-runs-code-from/

### Why this matters
An attacker who provides a malicious model file can run any code on the machine running vLLM. This means they can steal data, modify outputs, install malware, or take over the entire system. Any company using vLLM to load models from untrusted sources is at risk.

### What to do
1. Find where vLLM is installed and what version of PyTorch it uses
2. Check if you are running vLLM version 0.8.0 or later
3. Identify which models are loaded and where they come from
4. Upgrade vLLM to version 0.8.0
5. Upgrade PyTorch to version 2.6.0 or later
6. Test that models load correctly after the upgrade
7. Check for signs that a malicious model was loaded before the fix
8. Restart all vLLM services

Full steps: https://securityelites.com/ai-vulnerabilities/ghsa-ggpf-24jw-3fcw-vllm-loads-untrusted-model-files-and-runs-code-from/

### Done when
- [ ] vllm is at 0.8.0 or later everywhere it is installed
- [ ] Lock files, container images and CI configuration are updated
- [ ] Confirm that `pip show vllm` reports version 0.8.0 or later and `pip show torch` reports version 2.6.0 or later.
- [ ] Logs were checked for signs of earlier use

SecurityElites Fix Tracker

Record who owns this fix, the date it is due and when it is done, and see everything still open in one list. Free with a SecurityElites account.

Sign in to track this fix

Change history

  • 23 Apr 2025: Made public
  • 2 Dec 2026: Published

Official record

## Descriptionhttps://github.com/vllm-project/vllm/security/advisories/GHSA-rh4j-5rhw-hr54 reported a vulnerability where loading a malicious model could result in code execution on the vllm host. The fix applied to specify `weights_only=True` to calls to `torch.load()` did not solve the problem prior to PyTorch 2.6.0.PyTorch has issued a new CVE about this problem: https://github.com/advisories/GHSA-53q9-r3pm-6pq6This means that versions of vLLM using PyTorch before 2.6.0 are vulnerable to this problem. ## Background Knowledge When users install VLLM according to the official manual ![image](https://github.com/user-attachments/assets/d17e0bdb-26f2-46d6-adf6-0b17e5ddf5c7)But the version of PyTorch is specified in the requirements. txt file ![image](https://github.com/user-attachments/assets/94aad622-ad6d-4741-b772-c342727c58c7)So by default when the user install VLLM, it will install the PyTorch with version 2.5.1 ![image](https://github.com/user-attachments/assets/04ff31b0-aad1-490a-963d-00fda91da47b)In CVE-2025-24357, weights_only=True was used for patching, but we know this is not secure. Because we found that using Weights_only=True in pyTorch before 2.5.1 was unsafeHere, we use this interface to prove that it is not safe. ![image](https://github.com/user-attachments/assets/0d86efcd-2aad-42a2-8ac6-cc96b054c925)## Fix update PyTorch version to 2.6.0## Credit This vulnerability was found By Ji'an Zhou and Li'shuo Song

Weakness type: CWE-1395

Use this record in your own tools

Get this record as JSON

curl https://securityelites.com/wp-json/se-aivd/v1/vulns/GHSA-ggpf-24jw-3fcw

For scanners and pipelines: OSV format · CycloneDX format · API guide · Email alerts · Fix tracker

The plain-language sections were written with AI from the official record, and the upgrade versions come directly from the official data. Last updated 2 Dec 2026. Read the vendor advisory before changing a production system.