Mittel

vLLM: Responses API bypasses trust_request_chat_template for chat_template_kwargs

  • Veröffentlicht: 26.10.2026
  • Aktualisiert: 29.10.2026 13:17

Summary

vLLM's /v1/responses endpoint accepts request-level chat_template_kwargs, but does not apply the --trust-request-chat-template gate that protects Chat Completions, render, tokenize, and pooling paths.

When the server is run with the documented default trust_request_chat_template=False and no explicit --chat-template, a Responses request can pass:

js
{"chat_template_kwargs": {"chat_template": "<attacker Jinja template>"}}

That key is preserved by ChatParams.get_apply_chat_template_kwargs() and then bound as the chat_template parameter to the shared HF renderer. Prior vLLM advisories establish that request-controlled Jinja chat templates can cause CPU/memory exhaustion. This report covers the current-head Responses sibling path missed by the earlier fixes.

Technical Details

The shared OpenAI frontend has a validation helper that rejects request-supplied chat templates unless the trust flag is enabled. It explicitly checks both top-level chat_template and chat_template_kwargs["chat_template"].

Responses is a separate serving path:

  • vllm/entrypoints/openai/responses/protocol.py exposes chat_template_kwargs.
  • ResponsesRequest.build_chat_params() merges request kwargs.
  • OpenAIServingResponses._effective_chat_template_kwargs() uses those kwargs.
  • ChatParams.get_apply_chat_template_kwargs() preserves a request chat_template key when the server chat template is None.
  • vllm/renderers/hf.py unpacks the result into safe_apply_chat_template.

There is no equivalent trust gate in vllm/entrypoints/openai/responses/serving.py.

Impact

An authenticated caller who can submit /v1/responses requests can supply a request-controlled Jinja chat template despite the trust flag being disabled. The expected fixed behavior is the same as Chat Completions: reject chat_template_kwargs["chat_template"] unless the server was started with --trust-request-chat-template.

Suggested Fix

  • Add trust_request_chat_template to OpenAIServingResponses.
  • Pass args.trust_request_chat_template when constructing the Responses serving object.
  • Reject request.chat_template_kwargs["chat_template"] before rendering when trust is false.
  • Keep ordinary kwargs such as enable_thinking working.
  • Add regression tests for default-deny and opt-in-allow behavior on /v1/responses.

Affected Package/Versions

Source sweep found the affected shape in:

  • v0.16.0
  • v0.18.0
  • v0.20.0
  • v0.21.0
  • v0.22.0
  • v0.22.1
  • v0.23.0
  • current checkout 470229c37efaf69c86e8bc97482b0b1ff7551c65
  • current origin/main b3f0a0a0df76dda92ec4b2c9335f77e84adad911

Suggested affected range:

>= 0.16.0, <= 0.23.0

Appendix: Duplicate Research

This is related to, but distinct from:

  • GHSA-6fvq-23cw-5628 / CVE-2025-61620
  • GHSA-69j4-grxj-j64p / CVE-2025-62426

Those advisories establish the security impact of request-controlled Jinja templates and chat_template_kwargs, but they cover older Chat Completions/tokenize implementations. This report covers a current /v1/responses sibling path that still lacks the trust gate.

Local prior submissions this report..029 do not cover this root cause.

This advisory was fixed in MR50300.

Betroffene Software

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

PlattformPaketAnfällige VersionenBehoben in
Python (PyPI) vllm >= 0.16.0, < 0.32.0 0.32.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-400, CWE-770
Plattform
Python (PyPI)
Paket
vllm
Veröffentlicht
26.10.2026
Aktualisiert
29.10.2026 13:17

Quellen und Lizenzen

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

OSV / GitHub Advisory Database - GHSA-x567-49g5-p4cf - 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 (107) im Archiv
Einträge insgesamt
107
Erste → letzte
09.2024 10.2026
Ohne Fix
5
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Kritisch 10
  • Hoch 25
  • Mittel 55
  • Niedrig 4
  • Nicht bewertet 13

Veröffentlichungen pro Jahr

  1. 2024: 2
  2. 2025: 30
  3. 2026: 75
Schweregrad:
  1. vLLM: Responses API bypasses trust_request_chat_template for chat_template_kwargs dieser Eintrag
    Mittel · 6.5 CVE-2026-115918 >= 0.16.0, < 0.32.0 0.32.0
  2. Kritisch · 9.8 CVE-2026-115915 >= 0.30.0, < 0.32.0 0.32.0
  3. Hoch · 7.5 CVE-2026-54234 >= 0.17.1, < 0.24.0 0.24.0
  4. Hoch CVE-2026-55514 >= 0.12.0, < 0.24.0 0.24.0
  5. Kritisch · 9.1 CVE-2026-48746 >= 0.3.0, < 0.22.0 0.22.0
  6. Kritisch · 9.8 CVE-2026-22778 >= 0.8.3, < 0.14.1 0.14.1
  7. Hoch · 8.8 CVE-2026-22807 >= 0.10.1, < 0.14.0 0.14.0
  8. Hoch · 8.8 CVE-2026-56340 >= 0.10.2, < 0.13.0 0.13.0
  9. Hoch · 6.5 CVE-2025-62372 >= 0.5.5, < 0.11.1 0.11.1
  10. Hoch · 8.8 CVE-2025-62164 >= 0.10.2, < 0.11.1 0.11.1
  11. Hoch · 7.5 CVE-2025-59425 < 0.11.0 0.11.0
  12. Hoch · 8.8 CVE-2025-9141 >= 0.10.0, < 0.10.1.1 0.10.1.1
  13. Hoch · 7.5 CVE-2025-48956 >= 0.1.0, < 0.10.1.1 0.10.1.1
  14. Kritisch · 9.8 CVE-2025-47277 >= 0.6.5, < 0.8.5 0.8.5
  15. Hoch · 8.0 CVE-2025-30165 >= 0.5.2, < 0.10.0 0.10.0
  16. Kritisch · 10.0 CVE-2025-32444 >= 0.6.5, < 0.8.5 0.8.5
  17. Hoch · 7.5 CVE-2025-30202 >= 0.5.2, < 0.8.5 0.8.5
  18. Kritisch · 9.8 CVE-2024-9052 <= 0.8.1 keine Korrektur
  19. Kritisch · 9.8 CVE-2024-11041 <= 0.6.2 keine Korrektur
  20. Kritisch · 9.0 CVE-2025-29783 >= 0.6.5, < 0.8.0 0.8.0
  21. 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.