CVE-2025-46560: vLLM: Quadratic Time Complexity in Input Token Processing leads to denial of service
vLLM 0.8.0 up to 0.8.5 expands multimodal placeholder tokens in `input_processor_for_phi4mm` with repeated list concatenation, which takes quadratic time. A request with thousands of placeholders ties up CPU and denies service. Fixed in vLLM 0.8.5.
Published Apr 29, 2025 · Updated Jul 17, 2026 · Analysis Nov 1, 2026
What an attacker can do
The function input_processor_for_phi4mm in vllm/model_executor/models/phi4mm.py replaces placeholder tokens such as <|audio_*|> and <|image_*|> with repeated tokens of a precomputed length. For each placeholder, it rebuilds the list with input_ids = input_ids[:i] + tokens + input_ids[i+1:]. Each rebuild copies the whole list, so total work grows roughly with the square of the input size.
The reporter's timings show it: 100 placeholders took 0.002 seconds, 3,200 took 2.7 seconds and 6,400 took 11.9 seconds. Doubling the input quadruples the time. The advisory's example is 10,000 <|audio_1|> tokens.
The attacker needs to send requests to a vLLM server that serves a Phi-4-multimodal model, with low privileges per the CVSS vector. While the request preprocesses, that process spends CPU on copying lists. A few such requests can slow or starve other users of the server. The advisory describes no code execution or data exposure. Note the CWE listed (regex complexity) does not match the list-concatenation cause described.
Who is affected
Affected: vLLM from 0.8.0 up to but not including 0.8.5. Check:
pip show vllmThe flawed code is in the Phi-4-multimodal model path, so servers that do not serve that model do not run it.
vllm
- Ecosystem
- PyPI
- Affected
- >= 0.8.0, < 0.8.5
- Fixed in
- 0.8.5
- Check
pip show vllm
How to fix it
Upgrade to vLLM 0.8.5:
pip install --upgrade vllm==0.8.5The advisory suggests the fix pattern: precompute placeholder positions and expansion lengths, and build one output list instead of concatenating repeatedly. It names no workaround. Until you upgrade, cap request size and the number of multimodal placeholders at your gateway, and require authentication.
How to tell if you were hit
Look for the vLLM API process at high CPU while GPUs sit idle, and for requests whose prompts contain thousands of repeated <|audio_ or <|image_ placeholders. Check request logs for large payloads sent to the Phi-4-multimodal model. The advisory lists no log signature.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
A critical performance vulnerability has been identified in the input preprocessing logic of the multimodal tokenizer. The code dynamically replaces placeholder tokens (e.g., <|audio_*|>, <|image_*|>) with repeated tokens based on precomputed lengths. Due to inefficient list concatenation operations, the algorithm exhibits quadratic time complexity (O(n²)), allowing malicious actors to trigger resource exhaustion via specially crafted inputs.
Details
Affected Component: input_processor_for_phi4mm function. https://github.com/vllm-project/vllm/blob/8cac35ba435906fb7eb07e44fe1a8c26e8744f4e/vllm/model_executor/models/phi4mm.py#L1182-L1197
The code modifies the input_ids list in-place using input_ids = input_ids[:i] + tokens + input_ids[i+1:]. Each concatenation operation copies the entire list, leading to O(n) operations per replacement. For k placeholders expanding to m tokens, total time becomes O(kmn), approximating O(n²) in worst-case scenarios.
PoC
Test data demonstrates exponential time growth:
test_cases = [100, 200, 400, 800, 1600, 3200, 6400]
run_times = [0.002, 0.007, 0.028, 0.136, 0.616, 2.707, 11.854] # secondsDoubling input size increases runtime by ~4x (consistent with O(n²)).
Impact
Denial-of-Service (DoS): An attacker could submit inputs with many placeholders (e.g., 10,000 <|audio_1|> tokens), causing CPU/memory exhaustion. Example: 10,000 placeholders → ~100 million operations.
Remediation Recommendations
Precompute all placeholder positions and expansion lengths upfront. Replace dynamic list concatenation with a single preallocated array.
# Pseudocode for O(n) solution
new_input_ids = []
for token in input_ids:
if token is placeholder:
new_input_ids.extend([token] * precomputed_length)
else:
new_input_ids.append(token)Credited to kexinoh, d3do-23, lonelyuan, russellb, DarkLight1337, Isotr0py.
Questions
- Which model does this affect?
The flaw is in
input_processor_for_phi4mm, the Phi-4-multimodal input processor. The advisory does not name other models.- How fast does the cost grow?
Quadratically. In the reporter's data, 3,200 placeholders took about 2.7 seconds and 6,400 took about 11.9 seconds, so doubling the input roughly quadruples the time.
- Is there a fixed version?
Yes, vLLM 0.8.5. Versions from 0.8.0 up to but not including 0.8.5 are affected.
References
Read for this analysis:
- https://github.com/vllm-project/vllm/security/advisories/GHSA-vc6m-hm49-g9qg
- https://github.com/advisories/GHSA-vc6m-hm49-g9qg
- https://github.com/vllm-project/vllm/blob/8cac35ba435906fb7eb07e44fe1a8c26e8744f4e/vllm/model_executor/models/phi4mm.py#L1182-L1197
- https://nvd.nist.gov/vuln/detail/CVE-2025-46560
- https://github.com/pypa/advisory-database/tree/main/vulns/vllm/PYSEC-2026-2022.yaml
- https://github.com/vllm-project/vllm
- https://pypi.org/project/vllm
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More vLLM vulnerabilities
All vLLM entriesCVE-2026-115911
vLLM: DoS via unbounded chat_template Jinja2 rendering exhausts the renderer thread pool
medium6.5Oct 28, 2026CVE-2026-115912
vLLM: Public multimodal SHM handle forgery reaches worker-side `pickle.loads()` with insecure serialization disabled
high7.5Oct 28, 2026CVE-2026-115913
vLLM: Phi-4 multimodal audio encoder materializes and retains full attention matrices: a single max-length audio OOM-crashes the vLLM engine
medium6.5Oct 28, 2026CVE-2026-115914
vLLM DeepSeek-OCR image processing vulnerable to denial of service
medium6.5Oct 28, 2026CVE-2026-115915
vLLM: Untrusted EPS inputs can trigger denial of service or Ghostscript RCE
high8.1Oct 28, 2026CVE-2026-115916
vLLM: Out-of-vocabulary prompt token id passes input validation and triggers a CUDA device-side assert (engine crash / DoS)
medium6.5Oct 28, 2026
