CVE-2026-115911: vLLM: DoS via unbounded chat_template Jinja2 rendering exhausts the renderer thread pool
In vLLM 0.19.0 up to 0.31.x, one authenticated request with a short, hostile Jinja2 chat template can wedge every chat-style endpoint for all tenants until the server restarts. A string-multiplication variant instead OOM-kills the API server. The fixed version is vLLM 0.32.0. It is a denial of service only, with no code execution.
Published Oct 28, 2026 · Analysis Oct 29, 2026
What an attacker can do
vLLM renders chat templates through tokenizer.apply_chat_template() in an ImmutableSandboxedEnvironment. The sandbox blocks code-execution escapes. It sets no wall-clock timeout, no output-size cap and no limit on nested loops or binary operations. The render runs in a ThreadPoolExecutor whose max_workers defaults to 1 (renderer_num_workers), and a CPython worker thread cannot be interrupted. One template with a huge loop therefore holds the only render thread forever.
The effect hits /v1/chat/completions, /v1/responses, /tokenize, chat-style /pooling and chat-style /invocations, for every tenant on that replica. It survives client disconnects. The string-multiplication variant exhausts memory and kills the API-server process. Engine and worker processes stay up for the CPU variant.
There are two ways in. An authenticated API client can send a template of under 100 bytes. Because of a separately reported gate omission on /v1/responses (GHSA-jmjw-q4x3-hmc2), this works in a default vllm serve setup when --chat-template is unset. Or a malicious model repo can ship the template in tokenizer_config.json. It then wedges each replica that loads it on the first real chat request, even with trust_remote_code=False. Models with model_type of gpt_oss are not affected.
Who is affected
vLLM from 0.19.0 up to but not including 0.32.0. The default-config attack needs a non-harmony model, renderer_num_workers left at 1, and no --chat-template set. Most Hugging Face models ship their own template, so that is the usual state.
pip show vllmAlso review which model repos you load, since a hostile tokenizer_config.json is an attack path of its own.
vllm
- Ecosystem
- PyPI
- Affected
- >= 0.19.0, < 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"Pull request 50300 rejects a user-supplied chat_template in chat_template_kwargs for /v1/responses. It adds static checks that refuse excessive range(), string multiplication and deeply nested loops. It also adds an async render timeout set by the VLLM_CHAT_TEMPLATE_RENDER_TIMEOUT environment variable. The Rust frontend gets a render budget of 500,000 minijinja instructions and renders off the shared async runtime. The sources give no workaround for older versions. Restricting who holds API keys limits the exposure until you upgrade.
How to tell if you were hit
Look for chat endpoints that hang while the process stays alive and health checks still pass. Check for requests carrying a chat_template or chat_template_kwargs field, especially to /v1/responses, and for unusually small requests followed by total loss of chat responses. Watch the API-server process for CPU pinned at one core or for an OOM kill in the system log. Review the tokenizer_config.json of every model you load for templates with large range() calls, nested for loops or string multiplication.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
vLLM renders chat templates by passing the resolved Jinja2 source to tokenizer.apply_chat_template(), which compiles and .render()s it in an ImmutableSandboxedEnvironment. The sandbox prevents code-execution escapes but imposes no wall-clock timeout, no output-size cap, and no nested-loop or binop limit. The render runs in a ThreadPoolExecutor whose max_workers defaults to 1, and CPython worker threads cannot be interrupted. An authenticated API client (or a malicious model repo loaded with trust_remote_code=False) can therefore submit a single short template and permanently wedge all chat-style endpoints (/v1/chat/completions, /v1/responses, /tokenize, /pooling-chat, /invocations-chat) for every tenant until the process is restarted. A string-multiplication variant instead OOM-kills the API-server process. Because of a separately-reported (GHSA-jmjw-q4x3-hmc2) gate omission on /v1/responses, the remote authenticated attacker vector works in default `vllm serve` configuration with no operator opt-in.
Impact
A single authenticated request of <100 bytes permanently denies all chat-style inference (/v1/chat/completions, /v1/responses, /tokenize, /pooling-chat, /invocations-chat) to every tenant of the API-server replica until the operator restarts the process. The string-multiplication variant OOM-kills the process. In a multi-tenant deployment this is a cross-tenant denial-of-service from any one tenant. From the malicious-model angle, a model repo whose tokenizer_config.json carries the hostile template wedges every replica that loads it on the first legitimate chat request, with trust_remote_code=False.
Preconditions: any non-harmony model (model_type != gpt_oss); renderer_num_workers at its default of 1; for the default-config authenticated API attacker vector, --chat-template must be unset (the default because most HF models ship their own). Blast radius: API-server process, per replica. Engine/worker processes unaffected by the CPU variant (event loop survives); affected by the memory variant (process OOM). Persistence: until process restart. Survives client disconnect.
This advisory was fixed in MR50300.
Credited to oran-s, jperezdealgaba.
Questions
- Does CVE-2026-115911 allow code execution?
No. The Jinja2 sandbox still blocks code-execution escapes. The flaw is the missing resource limits, so the impact is availability only.
- Can an unauthenticated user trigger it?
The CVSS vector requires low privileges, meaning a valid API client. A malicious model repository loaded by your server is a second path that needs no request from an attacker.
- Does setting trust_remote_code=False help?
No. The hostile template lives in
tokenizer_config.json, which is not remote code. The advisory says a model repo can wedge replicas even withtrust_remote_code=False.- Do I need to restart after the attack?
Yes. The wedged render thread cannot be interrupted, and the denial persists until the API-server process restarts.
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-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-115916
vLLM: Out-of-vocabulary prompt token id passes input validation and triggers a CUDA device-side assert (engine crash / DoS)
medium6.5Oct 28, 2026CVE-2026-115917
vLLM: Permissive default CORS origins allow cross-origin requests to the vLLM HTTP server
low3.4Oct 28, 2026
