INCIDENT MAP

Browse / Unbounded Consumption / CVE-2026-54234

vLLM has Remote DoS via Invalid Recovered Token Reinjection

CVE-2026-54234 ยท 2026-07-17 high

Class
Unbounded Consumption (filed by a model that read the advisory)
Technique
Denial of service
Also involves
AI Framework and Platform Flaws
Affected
vllm (PyPI)
CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
0.6% chance of exploitation in 30 days

How it works, in short

An overlapping generate and abort sequence makes speculative decoding feed an out-of-vocabulary sentinel token back into the drafter, crashing the shared worker. (Our summary, written by a model. The source text is below.)

Details

Summary

A frontend-legal multi-request speculative workload can make vLLM produce an out-of-vocabulary recovered token equal to vocab_size, convert that value to -1 when choosing the next live token for a request, and then feed that -1 back into the next drafter input ids. On Qwen3 GPTQ this reaches the worker-side drafting / attention path and crashes the engine with a GPU device-side assert.

The same issue is reachable through the public gRPC request surface by sending a specific overlapping Generate / Abort sequence.

Impact

Affected version

Repro model

Trigger chain

Details

Simple example

The important distinction is:

In simplified form, the bad transition looks like this:

sampled speculative row:
[151936, -1, -1, -1, ...]

At this point, the trailing -1 values are only padding. The critical problem
is that the first position holds 151936, which is out of vocabulary and is
being treated as the request's real next token.

Then vLLM prepares the next-token buffer:

next_token_ids:
[-1, ...]

Finally, that converted -1 is written back into the live model input ids:

input_ids_after:
[-1, 0, 0, 0, ...]

The crash happens because the live next token became -1 and was later consumed by the drafting / embedding / attention path, not merely because the speculative row contained padded -1 entries.

Trigger path in code

On the verified Qwen3 run, the recovered-token trace shows
recovered_token_ids[0] = 151936, which is exactly vocab_size for this
checkpoint.
3. The speculative proposer then prepares the next-token row from the sampled
speculative row.

   # vllm/v1/spec_decode/eagle.py
   def prepare_next_token_ids_padded(...):
       ...
       eagle_prepare_next_token_padded_kernel[grid](
           sampled_token_ids,
           discard_request_mask,
           backup_tokens_gpu,
           next_token_ids,
           valid_sampled_tokens_count,
           gpu_input_batch.vocab_size,
           ...
       )
       return next_token_ids, valid_sampled_tokens_count
   

In the verified trace, this step receives a sampled row beginning with
151936, followed by -1 padding. The important point is that 151936
occupies the first live token position for the request. This step then
produces next_token_ids[0] = -1, meaning the live next token for the
request has been converted to -1.
4. The drafter then rotates the draft input ids and inserts those
next_token_ids back into the live input-id buffer.

   # vllm/v1/spec_decode/eagle.py
   def set_inputs_first_pass(...):
       ...
       self.input_ids[token_indices_to_sample] = next_token_ids
   

In the verified trace, this produces input_ids_after[0] = -1.
5. The model-side embed path later consumes those input ids.

   # vllm/model_executor/models/qwen2.py
   def embed_input_ids(self, input_ids: torch.Tensor) -> torch.Tensor:
       return self.embed_tokens(input_ids)
   

In the verified trace, this is the first point where the converted -1
becomes visible as a real model input. The bug is not merely that the
sampled speculative row contained padding -1; the bug is that the live
next token for the request became -1 and was written back into input ids.
6. After that point, the visible sink depends on timing and backend state. On
the attached Qwen3 reproducer, the engine commonly dies later in the
drafting / attention path with CUDA error: device-side assert triggered,
for example under flash_attn_varlen_func(...).

Local script breakdown

repro_g4_recovered_minus1_local.py is a standalone local reproducer.

gRPC script breakdown

repro_g4_recovered_minus1_grpc.py is a standalone public gRPC reproducer.

Observed result

Local repro typically ends with:

gRPC repro typically ends with:

This demonstrates that the issue is reachable through the public gRPC request surface, not only through a local reproducer.

Log snippets

Local recovered-chain trace

sample_recovered_tokens_return:
  recovered_token_ids = [151936, ...]
  vocab_size = 151936

prepare_next_token_ids_padded:
  sampled_token_ids_head = [[151936, -1, -1, ...], ...]
  next_token_ids = [-1, ...]

set_inputs_first_pass:
  input_ids_after = [-1, 0, 0, 0, ...]

embed_input_ids_out_of_range:
  input_ids = [-1, 0, 0, 0, ...]

gRPC server log

torch.AcceleratorError: CUDA error: device-side assert triggered
...
vllm.v1.engine.exceptions.EngineDeadError: EngineCore encountered an issue. See stack trace (above) for the root cause.
...
Error in Generate for request post_crash_probe
vllm.v1.engine.exceptions.EngineDeadError: EngineCore encountered an issue. See stack trace (above) for the root cause.

Root cause

This is a speculative-decoding state-handling bug, not an invalid frontend token-id input bug.

The root cause is that a recovered speculative token can become equal to vocab_size, then be selected as the live next token for a request, then be converted to -1, and that converted -1 is still written back into live drafter input ids and later consumed by the drafting / embedding / attention path.

For the Qwen3 checkpoint used here:

This value should be described as the model vocab_size boundary value, not as a legal token id.

Attachments

The attached bundle for this report should contain:

These two standalone scripts are sufficient to reproduce the issue and its public gRPC reachability.

Fix

A fix for this vulnerability has been merged in: https://github.com/vllm-project/vllm/pull/44744

References

Source: GitHub Advisory Database, used under CC BY 4.0.