Skip to content
vLLMGHSA-hf3c-wxg2-49q9

vLLM vulnerable to Denial of Service by abusing xgrammar cache

Medium6.5Published Apr 15, 2025

GitHub advisory

Affected versions

PackageAffectedFixed in
vllm
PyPI
>= 0.6.5, < 0.8.40.8.4
Details and references

### Impact This report is to highlight a vulnerability in XGrammar, a library used by the structured output feature in vLLM. The XGrammar advisory is here: https://github.com/mlc-ai/xgrammar/security/advisories/GHSA-389x-67px-mjg3 The [xgrammar](https://xgrammar.mlc.ai/docs/) library is the default backend used by vLLM to support structured output (a.k.a. guided decoding). Xgrammar provides a required, built-in cache for its compiled grammars stored in RAM. xgrammar is available 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, resulting in an addition to the cache for each request. This can result in a Denial of Service by consuming all of the system's RAM. Note that even if vLLM was configured to use a different backend by default, it is still possible to choose xgrammar on a per-request basis using the `guided_decoding_backend` key of the `extra_body` field of the request with the V0 engine. This per-request choice is not available when using the V1 engine. ### Patches * https://github.com/vllm-project/vllm/pull/16283 ### Workarounds There is no way to workaround this issue in existing versions of vLLM other than preventing untrusted access to the OpenAI compatible API server. ### References * https://github.com/mlc-ai/xgrammar/security/advisories/GHSA-389x-67px-mjg3

CVSS 3.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Severity from
GitHub (reviewed advisory)
Weakness
CWE-1395, CWE-770

More vLLM advisories

All vLLM
DateAdvisory
Apr 232025CVE-2025-24357 Malicious model remote code execution fix bypass with PyTorch < 2.6.0
GHSA-ggpf-24jw-3fcwCritical9.8fixed in 0.8.0
Apr 292025Data exposure via ZeroMQ on multi-node vLLM deployment
CVE-2025-30202High7.5fixed in 0.8.5
Apr 292025vLLM Vulnerable to Remote Code Execution via Mooncake Integration
CVE-2025-32444Critical10.0fixed in 0.8.5
Apr 292025vLLM: Quadratic Time Complexity in Input Token Processing​ leads to denial of service
CVE-2025-46560Medium6.5fixed in 0.8.5
May 62025Remote Code Execution Vulnerability in vLLM Multi-Node Cluster Configuration
CVE-2025-30165High8.0fixed in 0.10.0
Mar 202025vLLM allows Remote Code Execution by Pickle Deserialization via AsyncEngineRPCServer() RPC server entrypoints
CVE-2024-9053Critical9.8no fix yet

Critical advisories by email

Wednesdays: the week’s critical and high advisories in the AI and data stack, with the fixed versions. Only in weeks that have some.

Double opt-in. Unsubscribe any time.