Skip to content
MediumVulnerabilityLLM-specific

GHSA-hf3c-wxg2-49q9: vLLM vulnerable to Denial of Service by abusing xgrammar cache

Published
Record updated
View JSON
Affected
  • vllm >= 0.6.5, < 0.8.4
Fixed in
0.8.4

Summary

vLLM's structured output feature uses the XGrammar library, which keeps a required, built-in RAM cache of compiled grammars and is enabled by default through the OpenAI compatible API server with both the V0 and V1 engines. A malicious user can send a stream of very short decoding requests with unique schemas, adding a cache entry for each request and consuming all of the system's RAM, causing a Denial of Service.

Mitigation

Patch: https://github.com/vllm-project/vllm/pull/16283. No workaround exists in existing versions of vLLM other than preventing untrusted access to the OpenAI compatible API server.