llamaCVEVulnerability Intelligence
/
Advisory · PyPA · PyPI · vllm

PYSEC-2026-2013

vLLM: Resource-Exhaustion (DoS) through Malicious Jinja Template in OpenAI-Compatible Server

Parche disponible
Descargar PNG JSON
CVSS
—
N/D
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -276 d de la divulgación
Exposición134 dDesde la divulgación, 7 jul 2026, 11:03 a. m.
Detección132 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Parche 0.11.0
Monitoreo
Detectada
4 oct 25
7 jul 26
17 nov 26
19 nov 26
4 oct 25
15 ene 26
28 abr 26
8 ago 26
19 nov 26
FechaFaseEventoDetalle
Remediación Parche 0.11.0 vllm · -276 d desde divulgación
Divulgación Publicada PYSEC-2026-2013 divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen
Descripción del advisory
Texto original · PyPA · en inglés
Summary

A resource-exhaustion (denial-of-service) vulnerability exists in multiple endpoints of the OpenAI-Compatible Server due to the ability to specify Jinja templates via the `chat_template` and `chat_template_kwargs` parameters. If an attacker can supply these parameters to the API, they can cause a service outage by exhausting CPU and/or memory resources.

Details

When using an LLM as a chat model, the conversation history must be rendered into a text input for the model. In `hf/transformer`, this rendering is performed using a Jinja template. The OpenAI-Compatible Server launched by vllm serve exposes a `chat_template` parameter that lets users specify that template. In addition, the server accepts a `chat_template_kwargs` parameter to pass extra keyword arguments to the rendering function.

Because Jinja templates support programming-language-like constructs (loops, nested iterations, etc.), a crafted template can consume extremely large amounts of CPU and memory and thereby trigger a denial-of-service condition.

Importantly, simply forbidding the `chat_template` parameter does not fully mitigate the issue. The implementation constructs a dictionary of keyword arguments for `apply_hf_chat_template` and then updates that dictionary with the user-supplied `chat_template_kwargs` via `dict.update`. Since `dict.update` can overwrite existing keys, an attacker can place a `chat_template` key inside `chat_template_kwargs` to replace the template that will be used by `apply_hf_chat_template`.

# vllm/entrypoints/openai/serving_engine.py#L794-L816
_chat_template_kwargs: dict[str, Any] = dict(
    chat_template=chat_template,
    add_generation_prompt=add_generation_prompt,
    continue_final_message=continue_final_message,
    tools=tool_dicts,
    documents=documents,
)
_chat_template_kwargs.update(chat_template_kwargs or {})

request_prompt: Union[str, list[int]]
if isinstance(tokenizer, MistralTokenizer):
    ...
else:
    request_prompt = apply_hf_chat_template(
        tokenizer=tokenizer,
        conversation=conversation,
        model_config=model_config,
        **_chat_template_kwargs,
    )
Impact

If an OpenAI-Compatible Server exposes endpoints that accept `chat_template` or `chat_template_kwargs` from untrusted clients, an attacker can submit a malicious Jinja template (directly or by overriding `chat_template` inside `chat_template_kwargs`) that consumes excessive CPU and/or memory. This can result in a resource-exhaustion denial-of-service that renders the server unresponsive to legitimate requests.

Fixes
  • https://github.com/vllm-project/vllm/pull/25794
Versiones

Rangos afectados

Afectada Corregida Última
vllm≥ 0.5.1 < 0.11.0
0.5.1
0.11.0
0.33.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
pypivllm
Corregida 0.11.0 -276 d 0.33.0 no afectada
Versiones corregidas0.11.0
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/advisories/GHSA-6fvq-23cw-5628
Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2025-61620
Otrahttps://github.com/vllm-project/vllm/security/advisories/GHSA-6fvq-23cw-5628
Otrahttps://github.com/vllm-project/vllm/pull/25794
Otrahttps://github.com/vllm-project/vllm/commit/7977e5027c2250a4abc1f474c5619c40b4e5682f
Otrahttps://github.com/vllm-project/vllm
Otrahttps://pypi.org/project/vllm

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.