CVE-2026-115916: vLLM: Out-of-vocabulary prompt token id passes input validation and triggers a CUDA device-side assert (engine crash / DoS)
vLLM before 0.32.0 accepts a prompt token id equal to the vocabulary size, one past the last embedding row. On single-GPU (tensor-parallel 1) deployments of models like Llama-2 (vocab 32000), one request with that id triggers a CUDA device-side assert and takes the engine down. Upgrade to vLLM 0.32.0.
Published Oct 28, 2026 · Analysis Nov 5, 2026
What an attacker can do
vllm/v1/engine/input_processor.py accepts a token id up to max(tokenizer.max_token_id, vocab_size - 1). In vllm/tokenizers/hf.py, max_token_id was max(max(vocab.values()), tokenizer.vocab_size). For Llama-2 tokenizers that gives 32000, while the largest real id is 31999. The embedding has exactly 32000 rows because 32000 is already a multiple of the padding size, 64. At tensor-parallel size 1, VocabParallelEmbedding.forward does not mask indices, so id 32000 reaches F.embedding out of range. That raises a CUDA device-side assert, which poisons the engine's CUDA context and stops the engine.
Any client that can send pre-tokenized input can do it: /v1/completions with prompt as token ids, flows fed by /tokenize, or the kv_transfer_params["prompt_token_ids"] path. The CVSS vector requires low privileges, so an API key counts. The result is denial of service only. With tensor-parallel size above 1 the id is masked, which likely gives wrong output instead of a crash.
Who is affected
vllm versions below 0.32.0 on pip. The crash needs tensor-parallel size 1 and a model whose vocabulary is a multiple of 64 and whose tokenizer.vocab_size is one past the highest real id. Llama-2 family models are the clear case. The advisory says Qwen2.5 is not affected because its embedding has padded headroom.
pip show vllmvllm
- Ecosystem
- PyPI
- Affected
- < 0.32.0
- Fixed in
- 0.32.0
- Check
pip show vllm
How to fix it
Upgrade to vllm 0.32.0:
pip install --upgrade "vllm>=0.32.0"The fix (pull request 59491) makes max_token_id in vllm/tokenizers/hf.py use tokenizer.vocab_size - 1, so an id equal to the vocabulary size fails input validation. The advisory lists no workaround. As an inference, a gateway could reject pre-tokenized prompts with ids at or above the model's vocabulary size.
How to tell if you were hit
Look for CUDA device-side assert errors in the vLLM engine log followed by the engine stopping or every later request failing. Match the time against requests that sent token ids as the prompt to /v1/completions. Check request logs for a token id equal to the vocabulary size, for example 32000 on Llama-2 models.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
For a model whose vocabulary size is an exact multiple of the embedding padding size (64) — e.g. any Llama-2-family model, vocab 32000 — a single request carrying a pre-tokenized prompt with token id equal to the vocab size (32000) passes vLLM's input-id validation but is one past the last embedding row. At tensor-parallel size 1 the embedding lookup does not mask indices, so the id reaches F.embedding out of range and raises a CUDA device-side assert, which poisons the engine's CUDA context and takes the engine down. Any client that can send pre-tokenized input (/v1/completions with prompt as token ids, /tokenize-fed flows, or the kv_transfer_params["prompt_token_ids"] reuse path) can trigger it.
Root cause
vllm/v1/engine/input_processor.py accepts a token id when id <= max(tokenizer.max_token_id, model_config.get_vocab_size() - 1). vllm/tokenizers/hf.py computes max_token_id = max(max(vocab.values()), tokenizer.vocab_size). For Llama-2 tokenizers max(vocab.values()) = 31999 but tokenizer.vocab_size = 32000, so max_token_id = 32000 — one greater than the largest valid id. The engine bound therefore becomes max(32000, 31999) = 32000, and id 32000 is accepted. The model's embedding has pad_vocab_size(32000, 64) = 32000 rows (no padding), valid indices 0..31999. At VocabParallelEmbedding.forward with tp_size == 1 there is no masking, so index 32000 hits F.embedding out of range.
Affected
- tp=1 (single GPU per model — common per-copy layout). tp>1 masks via
get_masked_input_and_mask, so the id is clamped, not an OOB — likely wrong output rather than a crash. - Models whose vocab is a multiple of 64 with
tokenizer.vocab_sizeone past the max real id (Llama-2 family, vocab 32000, is the clear case). Qwen2.5 is NOT affected (padded headroom).
Suggested fix
max_token_id in vllm/tokenizers/hf.py now uses tokenizer.vocab_size - 1, so an id equal to the vocabulary size fails input validation instead of reaching the embedding. Fixed in MR59491, released in v0.32.0.
Reporter
Shijie Lyu (GitHub shijie-lyu [email protected]). Reported privately per SECURITY.
This advisory was fixed in MR59491.
Credited to shijie-lyu, jperezdealgaba.
Questions
- Does CVE-2026-115916 affect Qwen2.5 models?
No. The advisory says Qwen2.5 is not affected, because its embedding has padded headroom beyond the vocabulary.
- Does the attack need pre-tokenized input?
Yes. The client must send token ids, for example as the prompt in /v1/completions, so it can place an out-of-range id.
- Can this run code on the server?
No. The advisory describes only an engine crash, an availability impact. It reports no code execution or data exposure.
References
Read for this analysis:
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
Coverage on the Beam blog
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-115917
vLLM: Permissive default CORS origins allow cross-origin requests to the vLLM HTTP server
low3.4Oct 28, 2026
