MediumGHSA-q97c-p368-75c4CVE-2026-115916PYSEC-2026-4347

vLLM: Out-of-vocabulary prompt token id passes input validation and triggers a CUDA device-side assert (engine crash / DoS)

Published 28 Oct 2026 · Updated 29 Oct 2026

Is your project on an affected vllm?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

vllmPyPI
Affected
<0.32.0
Fixed in
0.32.0
Update to the fixed version for your release line, for example:pip install 'vllm>=0.32.0'

Details

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_size one 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 lshjhf@gmail.com). Reported privately per SECURITY.

This advisory was fixed in MR59491.

Is GHSA-q97c-p368-75c4 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected vllm, and gives you the command that fixes it.

More advisories for vllm

  • LowCVE-2026-115917vLLM: Permissive default CORS origins allow cross-origin requests to the vLLM HTTP server · 28 Oct 2026
  • MediumCVE-2026-115913vLLM: Phi-4 multimodal audio encoder materializes and retains full attention matrices: a single max-length audio OOM-crashes the vLLM engine · 28 Oct 2026
  • MediumCVE-2026-115914vLLM DeepSeek-OCR image processing vulnerable to denial of service · 28 Oct 2026
  • HighCVE-2026-115915vLLM: Untrusted EPS inputs can trigger denial of service or Ghostscript RCE · 28 Oct 2026
  • HighCVE-2026-115912vLLM: Public multimodal SHM handle forgery reaches worker-side `pickle.loads()` with insecure serialization disabled · 28 Oct 2026
  • MediumCVE-2026-115918vLLM: Responses API bypasses trust_request_chat_template for chat_template_kwargs · 28 Oct 2026
All 113 advisories for vllm

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.