Skip to main content

vLLM CVE-2026-41523

HIGH
Code Injection (CWE-94)
2026-06-16 https://github.com/vllm-project/vllm GHSA-q8gq-377p-jq3r
7.5
CVSS 3.1 · Vendor: https://github.com/vllm-project/vllm
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Publish malicious HuggingFace model
  2. Delivery
    Victim loads model under python -O
  3. Exploit
    Pooler reads attacker activation_fn string
  4. Execution
    Stripped assert skips allowlist check
  5. Persist
    resolve_obj_by_qualname imports attacker module
  6. Impact
    Arbitrary code executes as vLLM process

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires three concrete preconditions, all explicitly stated in the advisory: (1) the vLLM Python process must be launched with optimization enabled - either 'python -O' or PYTHONOPTIMIZE=1 in the environment - so the assert-based allowlist is removed at compile time; (2) the victim must load an attacker-controlled HuggingFace model whose config.json populates either sentence_transformers.activation_fn or sbert_ce_default_activation_function (user-interaction step, matching CVSS UI:R); and (3) the model must use a cross-encoder architecture (e.g. BERT or RoBERTa with sequence classification) so that get_act_fn() is reached via resolve_classifier_act_fn() in SequencePooler or TokenPooler. Limiting factors: default Python execution (no -O) still enforces the assert and is not exploitable, models using standard generative architectures do not exercise the vulnerable pooler path, and operators that load only vetted/local models are not exposed even when -O is set.

Impact

The vendor-issued CVSS 3.1 score of 7.5 with vector AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H captures the trade-off well: the impact is full arbitrary code execution as the vLLM process (C:H/I:H/A:H), but AC:H, UI:R and the requirement that the target process be started with -O/PYTHONOPTIMIZE=1 plus loading a cross-encoder architecture mean exploitation is not a one-shot internet-wide bug. No EPSS score, KEV listing, or public PoC is included in the input, so this should be treated as 'no public exploit identified at time of analysis' rather than active exploitation. Real-world risk concentrates in environments that (a) run vLLM under PYTHONOPTIMIZE for performance, which the reporter notes is documented in production use, and (b) load models from untrusted HuggingFace authors or any pipeline that auto-pulls third-party models - in those settings this is effectively pre-auth RCE through the model supply chain and should be treated as high priority. For deployments that pin to vetted internal models and do not use -O, the practical exposure is materially lower, though the systemic warning that resolve_obj_by_qualname is called from ~20 sites without input validation argues for prompt patching regardless.

Exploit ScenarioDerived

An attacker publishes a HuggingFace cross-encoder model whose config.json sets sentence_transformers.activation_fn (or sbert_ce_default_activation_function) to a fully qualified Python name outside torch.nn.modules - for example, a module whose import side effect spawns a reverse shell. A victim operator running vLLM under python -O (or PYTHONOPTIMIZE=1) loads the model by name; during pooler initialization the stripped assert no longer enforces the allowlist, and resolve_obj_by_qualname() imports the attacker's module and calls getattr() on it, executing arbitrary code in the vLLM process. No public exploit is identified at time of analysis, but the patch diff and detailed advisory make a working proof-of-concept straightforward to construct.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 16, 2026

Arbitrary code execution in vLLM versions prior to 0.22.0 allows remote unauthenticated attackers to run code on the inference server by publishing a malicious HuggingFace model, when vLLM is launched in Python optimized mode (python -O or PYTHONOPTIMIZE=1). The sole guardrail restricting which activation function classes can be loaded from a model's config.json is implemented with a Python assert, which is stripped at compile time under -O, leaving an unrestricted import gadget directly fed by attacker-controlled data. No public exploit identified at time of analysis, but the vendor advisory (GHSA-q8gq-377p-jq3r) and a coordinated huntr.com submission document the issue in detail.

RemediationAI

Vendor-released patch: upgrade vLLM to 0.22.0 or later, which replaces the assert with an explicit 'if not function_name.startswith("torch.nn.modules."): raise ValueError(...)' in vllm/model_executor/layers/pooler/activations.py (commit b3c7ffcab82c2439726f8cb213800f6f38c023d3, advisory https://github.com/vllm-project/vllm/security/advisories/GHSA-q8gq-377p-jq3r). If you cannot upgrade immediately, the simplest compensating control is to stop running vLLM under python -O or with PYTHONOPTIMIZE=1 - this restores the assert and closes the vulnerable code path, at the cost of slightly larger memory footprint and losing the marginal CPU savings from stripped asserts and __debug__ branches. As a model-supply-chain control, restrict which HuggingFace repositories vLLM is allowed to load (pin to specific vetted revisions or mirror them to an internal registry) and forbid auto-pulling models from arbitrary external authors; this is high-value but introduces operational overhead in model curation. Defenders who maintain a fork can also locally backport the conditional-raise change shown in the upstream commit to older vLLM versions.

Affected Packages

pypi vllm fix: 0.22.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

vLLM is a high-throughput inference and serving engine for large language models written in Python (pkg:pip/vllm). In vllm/model_executor/layers/pooler/activations.py, the get_act_fn() routine reads an activation_fn / sbert_ce_default_activation_function string from the loaded HuggingFace model config and uses 'assert function_name.startswith("torch.nn.modules.")' as its only allowlist before passing the value to resolve_obj_by_qualname(), which performs importlib.import_module() followed by getattr() with no further validation. Python documents that assert is removed when the interpreter runs with -O or PYTHONOPTIMIZE=1, so the allowlist disappears in exactly the production-tuned configurations vLLM operators are likely to use. The root cause is CWE-94 (Improper Control of Generation of Code) realized through an assert-based security check, the same class CISA and Bandit (B101) / Ruff (S101) flag and the reason Django removed assert-based checks in ticket #32508; CVE-2017-1000433 in pysaml2 is a direct prior analogue. The reachable call sites are SequencePooler (vllm/model_executor/layers/pooler/seqwise/poolers.py:122) and TokenPooler (tokwise/poolers.py:130), invoked when loading cross-encoder / sentence-transformer models (e.g. BERT or RoBERTa for sequence classification).

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/vllm-project/vllm) PRIMARY 7.5 HIGH
AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 7.5 HIGH

Attacker is a remote unauthenticated model publisher (AV:N/PR:N) but victim must load the model and run vLLM under -O (UI:R, AC:H); successful exploit yields full process compromise (C:H/I:H/A:H).

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Red Hat 7.5 HIGH

Primary rating from Vendor (https://github.com/vllm-project/vllm).

CVSS VectorVendor: https://github.com/vllm-project/vllm

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

Summary

An assert-based security check in vLLM's activation function loading allows any unauthenticated attacker to achieve arbitrary code execution on the server by publishing a malicious HuggingFace model, when vLLM runs in Python optimized mode (python -O or PYTHONOPTIMIZE=1).

Details

vLLM uses an assert statement at vllm/model_executor/layers/pooler/activations.py:48 as its sole security control to restrict which activation functions can be loaded from a HuggingFace model's config.json:

python
# vllm/model_executor/layers/pooler/activations.py:35-53
function_name: str | None = None
if (
    hasattr(config, "sentence_transformers")
    and "activation_fn" in config.sentence_transformers
):
    function_name = config.sentence_transformers["activation_fn"]
elif (
    hasattr(config, "sbert_ce_default_activation_function")
    and config.sbert_ce_default_activation_function is not None
):
    function_name = config.sbert_ce_default_activation_function

if function_name is not None:
    assert function_name.startswith("torch.nn.modules."), (
        "Loading of activation functions is restricted to "
        "torch.nn.modules for security reasons"
    )
    fn = resolve_obj_by_qualname(function_name)()

Python's assert statements are stripped at compile time when running in optimized mode (python -O or PYTHONOPTIMIZE=1). When the assert is absent, the attacker-controlled function_name from the model's config.json is passed directly to resolve_obj_by_qualname() - an unrestricted import gadget:

python
def resolve_obj_by_qualname(qualname: str) -> Any:
    module_name, obj_name = qualname.rsplit(".", 1)
    module = importlib.import_module(module_name)
    return getattr(module, obj_name)

This is the same vulnerability class as CVE-2017-1000433 (pysaml2 assert-based auth bypass), flagged by Bandit B101 and Ruff S101, and the reason Django proactively replaced all assert-based security checks (ticket #32508).

Attacker-controlled input sources:

  • config.sentence_transformers["activation_fn"] (line 40)
  • config.sbert_ce_default_activation_function (line 45)

Affected call sites - get_act_fn() is called via resolve_classifier_act_fn() from:

  • vllm/model_executor/layers/pooler/seqwise/poolers.py:122 - SequencePooler
  • vllm/model_executor/layers/pooler/tokwise/poolers.py:130 - TokenPooler

Broader systemic risk: resolve_obj_by_qualname is called from ~20 locations across the codebase with no validation of its own. Any future caller feeding user-controlled input to it without validation creates the same vulnerability class.

Suggested fix: Replace the assert with an explicit conditional raise:

python
if not function_name.startswith("torch.nn.modules."):
    raise ValueError(
        "Loading of activation functions is restricted to "
        "torch.nn.modules for security reasons"
    )

Impact

Arbitrary code execution. A malicious model author publishes a HuggingFace model with a crafted config.json. When a victim loads this model with vLLM running under python -O or PYTHONOPTIMIZE=1, arbitrary code executes during model initialization with the privileges of the vLLM process.

The attack requires:

  1. Victim loads a malicious model from HuggingFace (user interaction)
  2. vLLM runs under python -O or PYTHONOPTIMIZE=1 (documented in production use)
  3. Model uses a cross-encoder architecture (e.g. BERT or RoBERTa with sequence classification)

Coordinated disclosure note: This vulnerability was also reported via huntr.com on April 2, 2026 (https://huntr.com/bounties/dcb05b04-e625-41e7-adbc-bbae0cc2d64c). A GitHub Security Advisory was also filed because it is vLLM's stated preferred disclosure channel per SECURITY.md.

Fix

A fix for this was introduced in this commit: https://github.com/vllm-project/vllm/commit/b3c7ffcab82c2439726f8cb213800f6f38c023d3

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 1 pypi packages depend on vllm (1 direct, 0 indirect)

Ecosystem-wide dependent count for version 0.22.0.

Executive ViewAI

Why It Matters

vLLM versions prior to 0.22.0 contain a critical vulnerability allowing remote attackers to execute arbitrary code on inference servers without authentication. Organizations deploying vLLM in Python optimized mode face immediate risk of complete system compromise through malicious AI model downloads. This affects any enterprise using open-source LLM inference, particularly those processing untrusted models from community repositories.

Business Impact: High
Compensating Controls

Apply vendor patch: vLLM 0.22.0+. If patching is delayed: (1) disable Python optimized mode to restore the assert-based protection; (2) restrict outbound downloads to approved internal model registries; (3) implement runtime execution monitoring on inference servers.

Threat Intelligence Overview

EPSS Score
0.4%
Top 69% exploitable
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Affected Products (CPE)CVE.org

pkg:pip/vllm

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy