NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · vLLM

CVE-2025-62426: vLLM vulnerable to DoS via large Chat Completion or Tokenization requests with specially crafted `chat_template_kwargs`

mediumCVSS 3.1 6.5GHSA-69j4-grxj-j64p

vLLM from 0.5.5 up to 0.11.0 lets an authenticated user stall the whole API server with one large request. The `chat_template_kwargs` parameter of `/v1/chat/completions` and `/tokenize` is unpacked without validation, so a caller can force blocking tokenization on the event loop. Upgrade to vLLM 0.11.1.

Published Nov 20, 2025 · Updated Jul 17, 2026 · Analysis Nov 1, 2026

What an attacker can do

In serving_engine.py, the chat_template_kwargs dictionary is unpacked into keyword arguments for apply_hf_chat_template in chat_utils.py, with no check on keys or values. That lets a caller override optional arguments of that function. The advisory's example is {"tokenize": True}, which turns on tokenization as part of applying the chat template, something the server does not expect at that point.

Tokenization is a blocking operation. With a large enough input, it blocks the API server's event loop, and every other request waits until it finishes. Both serving_chat.py and serving_tokenization.py go through _preprocess_chat, so both endpoints are open to it.

The attacker needs a valid account or API key and network access, matching CVSS low privileges. They get a denial of service: slow or stalled responses for all users of the server for as long as the tokenization lasts. Nothing is leaked or modified. Shared or multi-tenant vLLM servers are the most exposed, because one user can degrade service for all the others.

Who is affected

vLLM >= 0.5.5, < 0.11.1 with the OpenAI-compatible server enabled, so that /v1/chat/completions and /tokenize accept requests from users you do not fully control. Check the installed version:

pip show vllm

vllm

Ecosystem
PyPI
Affected
>= 0.5.5, < 0.11.1
Fixed in
0.11.1
Check
pip show vllm

How to fix it

Upgrade to vLLM 0.11.1:

pip install --upgrade "vllm>=0.11.1"

The fix is pull request 27205. The advisory lists no workaround. Until then, limit who can call the API, and have a gateway reject or strip chat_template_kwargs from requests if your clients do not use it. A gateway request size limit also reduces the time a single request can block.

How to tell if you were hit

Look for periods when the API stops responding or latency jumps for all clients while the process shows high CPU on one thread. In request logs, look for /v1/chat/completions or /tokenize calls whose JSON body has a chat_template_kwargs field with a tokenize key, or very large message bodies from a single key. Matching a latency spike to one user's request is the strongest evidence. Confirm the version with pip show vllm.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

The /v1/chat/completions and /tokenize endpoints allow a chat_template_kwargs request parameter that is used in the code before it is properly validated against the chat template. With the right chat_template_kwargs parameters, it is possible to block processing of the API server for long periods of time, delaying all other requests

Details

In serving_engine.py, the chat_template_kwargs are unpacked into kwargs passed to chat_utils.py apply_hf_chat_template with no validation on the keys or values in that chat_template_kwargs dict. This means they can be used to override optional parameters in the apply_hf_chat_template method, such as tokenize, changing its default from False to True.

https://github.com/vllm-project/vllm/blob/2a6dc67eb520ddb9c4138d8b35ed6fe6226997fb/vllm/entrypoints/openai/serving_engine.py#L809-L814

https://github.com/vllm-project/vllm/blob/2a6dc67eb520ddb9c4138d8b35ed6fe6226997fb/vllm/entrypoints/chat_utils.py#L1602-L1610

Both serving_chat.py and serving_tokenization.py call into this _preprocess_chat method of serving_engine.py and they both pass in chat_template_kwargs.

So, a chat_template_kwargs like {"tokenize": True} makes tokenization happen as part of applying the chat template, even though that is not expected. Tokenization is a blocking operation, and with sufficiently large input can block the API server's event loop, which blocks handling of all other requests until this tokenization is complete.

This optional tokenize parameter to apply_hf_chat_template does not appear to be used, so one option would be to just hard-code that to always be False instead of allowing it to be optionally overridden by callers. A better option may be to not pass chat_template_kwargs as unpacked kwargs but instead as a dict, and only unpack them after the logic in apply_hf_chat_template that resolves the kwargs against the chat template.

Impact

Any authenticated user can cause a denial of service to a vLLM server with Chat Completion or Tokenize requests.

Fix

https://github.com/vllm-project/vllm/pull/27205

Credited to russellb, Isotr0py, DarkLight1337.

Questions

Do I need credentials to exploit CVE-2025-62426?

The advisory says any authenticated user can do it. A server without authentication exposes it to anyone who can reach the API.

What does chat_template_kwargs {"tokenize": true} do?

It overrides the default of apply_hf_chat_template, so tokenization runs during chat template application. On large input that blocks the server's event loop and delays every other request.

Which endpoints are affected?

/v1/chat/completions and /tokenize. Both pass chat_template_kwargs into the shared _preprocess_chat method.

References

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 entries