{"id":"CVE-2026-115916","aliases":["GHSA-q97c-p368-75c4","PYSEC-2026-4347"],"title":"vLLM: Out-of-vocabulary prompt token id passes input validation and triggers a CUDA device-side assert (engine crash / DoS)","titleSource":"GitHub_M","descriptionSource":"OSV","declaredSeverity":"MODERATE","description":"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.\n\n## Root cause\n`vllm/v1/engine/input_processor.py` accepts a token id when `id <= max(tokenizer.max_token_id, model_config.get_vocab_size() - 1)`.\n`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.\nThe engine bound therefore becomes `max(32000, 31999) = 32000`, and id 32000 is accepted.\nThe 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.\n\n## Affected\n- 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.\n- 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).\n\n## Suggested fix \nmax_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](https://github.com/vllm-project/vllm/pull/59491), released in v0.32.0.\n\n## Reporter\nShijie Lyu (GitHub shijie-lyu lshjhf@gmail.com). Reported privately per SECURITY.\n\nThis advisory was fixed in [MR59491](https://github.com/vllm-project/vllm/pull/59491).","severity":"medium","score":6.5,"published":"2026-10-26T17:18:17.582Z","modified":"2026-10-29T11:10:41.396Z","withdrawn":false,"knownExploited":false,"affected":[{"ecosystem":"PyPI","name":"vllm","sources":[{"name":"OSV · GHSA-q97c-p368-75c4","url":"https://osv.dev/vulnerability/GHSA-q97c-p368-75c4"}],"ranges":[{"events":[{"introduced":"0"},{"fixed":"0.32.0"}],"type":"ECOSYSTEM"}],"versions":["0.0.1","0.1.0","0.1.1","0.1.2","0.1.3","0.1.4","0.1.5","0.1.6","0.1.7","0.10.0","0.10.1","0.10.1.1","0.10.2","0.11.0","0.11.1","0.11.2","0.12.0","0.13.0","0.14.0","0.14.1","0.15.0","0.15.1","0.16.0","0.17.0","0.17.1","0.18.0","0.18.1","0.19.0","0.19.1","0.2.0","0.2.1","0.2.1.post1","0.2.2","0.2.3","0.2.4","0.2.5","0.2.6","0.2.7","0.20.0","0.20.1","0.20.2","0.21.0","0.22.0","0.22.1","0.23.0","0.24.0","0.25.0","0.25.1","0.26.0","0.27.0","0.27.1","0.28.0","0.29.0","0.3.0","0.3.1","0.3.2","0.3.3","0.30.0","0.31.0","0.4.0","0.4.0.post1","0.4.1","0.4.2","0.4.3","0.5.0","0.5.0.post1","0.5.1","0.5.2","0.5.3","0.5.3.post1","0.5.4","0.5.5","0.6.0","0.6.1","0.6.1.post1","0.6.1.post2","0.6.2","0.6.3","0.6.3.post1","0.6.4","0.6.4.post1","0.6.5","0.6.6","0.6.6.post1","0.7.0","0.7.1","0.7.2","0.7.3","0.8.0","0.8.1","0.8.2","0.8.3","0.8.4","0.8.5","0.8.5.post1","0.9.0","0.9.0.1","0.9.1","0.9.2"],"fixed":["0.32.0"]},{"ecosystem":"PyPI","name":"vllm","sources":[{"name":"OSV · PYSEC-2026-4347","url":"https://osv.dev/vulnerability/PYSEC-2026-4347"}],"ranges":[{"events":[{"introduced":"0"},{"fixed":"0.32.0"}],"type":"ECOSYSTEM"}],"versions":["0.0.1","0.1.0","0.1.1","0.1.2","0.1.3","0.1.4","0.1.5","0.1.6","0.1.7","0.10.0","0.10.1","0.10.1.1","0.10.2","0.11.0","0.11.1","0.11.2","0.12.0","0.13.0","0.14.0","0.14.1","0.15.0","0.15.1","0.16.0","0.17.0","0.17.1","0.18.0","0.18.1","0.19.0","0.19.1","0.2.0","0.2.1","0.2.1.post1","0.2.2","0.2.3","0.2.4","0.2.5","0.2.6","0.2.7","0.20.0","0.20.1","0.20.2","0.21.0","0.22.0","0.22.1","0.23.0","0.24.0","0.25.0","0.25.1","0.26.0","0.27.0","0.27.1","0.28.0","0.29.0","0.3.0","0.3.1","0.3.2","0.3.3","0.30.0","0.31.0","0.4.0","0.4.0.post1","0.4.1","0.4.2","0.4.3","0.5.0","0.5.0.post1","0.5.1","0.5.2","0.5.3","0.5.3.post1","0.5.4","0.5.5","0.6.0","0.6.1","0.6.1.post1","0.6.1.post2","0.6.2","0.6.3","0.6.3.post1","0.6.4","0.6.4.post1","0.6.5","0.6.6","0.6.6.post1","0.7.0","0.7.1","0.7.2","0.7.3","0.8.0","0.8.1","0.8.2","0.8.3","0.8.4","0.8.5","0.8.5.post1","0.9.0","0.9.0.1","0.9.1","0.9.2"],"fixed":["0.32.0"]}],"sourceAffected":[],"references":["https://github.com/vllm-project/vllm/security/advisories/GHSA-q97c-p368-75c4","https://github.com/vllm-project/vllm/pull/59491","https://github.com/vllm-project/vllm/commit/37cecc8141e2dcba9dd534897a164d4baaf27229","https://github.com/vllm-project/vllm/releases/tag/v0.32.0","https://nvd.nist.gov/vuln/detail/CVE-2026-115916","https://github.com/vllm-project/vllm"],"sources":[{"name":"CVE","id":"CVE-2026-115916","modified":"2026-10-26T17:18:17.582Z","url":"https://www.cve.org/CVERecord?id=CVE-2026-115916"},{"name":"OSV","id":"GHSA-q97c-p368-75c4","modified":"2026-10-29T11:10:41.396326766Z","url":"https://osv.dev/vulnerability/GHSA-q97c-p368-75c4"},{"name":"OSV","id":"PYSEC-2026-4347","modified":"2026-10-29T11:00:02.788688043Z","url":"https://osv.dev/vulnerability/PYSEC-2026-4347"}],"assessments":[{"source":"GitHub_M","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5},{"source":"OSV","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5},{"source":"OSV","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5}],"cve":{"records":[{"id":"CVE-2026-115916","source":"GitHub_M","state":"PUBLISHED","reasons":[],"replacements":[],"disputed":false,"unsupportedWhenAssigned":false,"reserved":"2026-10-23T20:21:45.107Z","published":"2026-10-26T17:18:17.582Z","modified":"2026-10-26T17:18:17.582Z"}],"publishers":[{"name":"GitHub_M","role":"CNA","organizationId":"a0819718-46f1-4df5-94e2-005712e83aaa","modified":"2026-10-26T17:18:17.582Z"}],"references":[{"url":"https://github.com/vllm-project/vllm/security/advisories/GHSA-q97c-p368-75c4","tags":["x_refsource_CONFIRM"],"source":"GitHub_M"},{"url":"https://github.com/vllm-project/vllm/pull/59491","tags":["x_refsource_MISC"],"source":"GitHub_M"},{"url":"https://github.com/vllm-project/vllm/commit/37cecc8141e2dcba9dd534897a164d4baaf27229","tags":["x_refsource_MISC"],"source":"GitHub_M"},{"url":"https://github.com/vllm-project/vllm/releases/tag/v0.32.0","tags":["x_refsource_MISC"],"source":"GitHub_M"}],"weaknesses":[{"id":"CWE-129","description":"CWE-129: Improper Validation of Array Index","source":"GitHub_M"},{"id":"CWE-193","description":"CWE-193: Off-by-one Error","source":"GitHub_M"}],"applicability":[],"prioritization":[]},"products":[{"vendor":"vllm-project","name":"vllm","platforms":[],"versions":[{"version":"< 0.32.0","status":"affected"}],"cpes":[],"source":"GitHub_M","url":"https://www.cve.org/CVERecord?id=CVE-2026-115916"}],"remediation":[],"observedAt":"2026-10-29T15:10:41.730Z","kev":{"status":"not-listed","checkedAt":"2026-10-31T09:15:31.262Z"},"coverage":[{"source":"NVD","status":"available","checkedAt":"2026-10-28T22:30:34.340Z","attemptedAt":"2026-10-28T22:30:34.340Z"},{"source":"GHSA","status":"available","checkedAt":"2026-10-28T22:30:33.810Z","attemptedAt":"2026-10-28T22:30:33.810Z"},{"source":"EUVD","status":"available","checkedAt":"2026-10-28T22:30:33.004Z","attemptedAt":"2026-10-28T22:30:33.004Z"},{"source":"EPSS","status":"available","checkedAt":"2026-10-28T22:30:33.088Z","attemptedAt":"2026-10-28T22:30:33.088Z"}],"evidence":[{"source":"ENISA EUVD","id":"EUVD-2026-110036","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-110036","modified":"Oct 28, 2026, 9:15:08 PM","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","checkedAt":"2026-10-28T22:30:33.004Z"},{"source":"FIRST EPSS","id":"CVE-2026-115916","url":"https://www.first.org/epss/","probability":0.00305,"percentile":0.23205,"date":"2026-10-28","checkedAt":"2026-10-28T22:30:33.088Z"},{"source":"GitHub Advisory Database","id":"GHSA-q97c-p368-75c4","url":"https://github.com/advisories/GHSA-q97c-p368-75c4","modified":"2026-10-28T21:15:09Z","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","checkedAt":"2026-10-28T22:30:33.810Z"},{"source":"NVD","id":"CVE-2026-115916","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-115916","modified":"2026-10-28T15:36:34.777","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","checkedAt":"2026-10-28T22:30:34.340Z"}],"aiSummary":null}