Mittel

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

  • Veröffentlicht: 07.10.2025
  • Aktualisiert: 11.10.2026 15:17

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.

python
# 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

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
Python (PyPI) vllm >= 0.5.1, < 0.11.0 0.11.0

Verweise

CVSS-Wert 6.5/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Schwäche (CWE)
CWE-20, CWE-400, CWE-770
Plattform
Python (PyPI)
Paket
vllm
Veröffentlicht
07.10.2025
Aktualisiert
11.10.2026 15:17

Quellen und Lizenzen

OSV / GitHub Advisory Database - PYSEC-2026-2013 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-6fvq-23cw-5628 - CC BY 4.0

Schwachstellenhistorie: vllm

Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (94) im Archiv
Einträge insgesamt
94
Erste → letzte
09.2024 10.2026
Ohne Fix
5
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Kritisch 9
  • Hoch 23
  • Mittel 47
  • Niedrig 4
  • Nicht bewertet 11

Veröffentlichungen pro Jahr

  1. 2024: 2
  2. 2025: 30
  3. 2026: 62
Schweregrad:
  1. Hoch · 7.5 CVE-2026-54234 >= 0.17.1, < 0.24.0 0.24.0
  2. Hoch CVE-2026-55514 >= 0.12.0, < 0.24.0 0.24.0
  3. Kritisch · 9.1 CVE-2026-48746 >= 0.3.0, < 0.22.0 0.22.0
  4. Kritisch · 9.8 CVE-2026-22778 >= 0.8.3, < 0.14.1 0.14.1
  5. Hoch · 8.8 CVE-2026-22807 >= 0.10.1, < 0.14.0 0.14.0
  6. Hoch · 8.8 CVE-2026-56340 >= 0.10.2, < 0.13.0 0.13.0
  7. Hoch · 6.5 CVE-2025-62372 >= 0.5.5, < 0.11.1 0.11.1
  8. Hoch · 8.8 CVE-2025-62164 >= 0.10.2, < 0.11.1 0.11.1
  9. vLLM: Resource-Exhaustion (DoS) through Malicious Jinja Template in OpenAI-Compatible Server dieser Eintrag
    Mittel · 6.5 CVE-2025-61620 >= 0.5.1, < 0.11.0 0.11.0
  10. Hoch · 7.5 CVE-2025-59425 < 0.11.0 0.11.0
  11. Hoch · 8.8 CVE-2025-9141 >= 0.10.0, < 0.10.1.1 0.10.1.1
  12. Hoch · 7.5 CVE-2025-48956 >= 0.1.0, < 0.10.1.1 0.10.1.1
  13. Kritisch · 9.8 CVE-2025-47277 >= 0.6.5, < 0.8.5 0.8.5
  14. Hoch · 8.0 CVE-2025-30165 >= 0.5.2, < 0.10.0 0.10.0
  15. Kritisch · 10.0 CVE-2025-32444 >= 0.6.5, < 0.8.5 0.8.5
  16. Hoch · 7.5 CVE-2025-30202 >= 0.5.2, < 0.8.5 0.8.5
  17. Kritisch · 9.8 CVE-2024-9052 <= 0.8.1 keine Korrektur
  18. Kritisch · 9.8 CVE-2024-11041 <= 0.6.2 keine Korrektur
  19. Kritisch · 9.0 CVE-2025-29783 >= 0.6.5, < 0.8.0 0.8.0
  20. Hoch · 7.5 CVE-2024-8768 < 0.5.5 0.5.5

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.