{"schemaVersion":3,"id":"GHSA-HF3C-WXG2-49Q9","aliases":[],"status":"published","duplicateOf":null,"title":null,"description":"vLLM vulnerable to Denial of Service by abusing xgrammar cache\n\n### Impact\n\nThis 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\n\nThe [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.\n\nA 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.\n\nNote 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.\n### Patches\n\n* https://github.com/vllm-project/vllm/pull/16283\n\n### Workarounds\n\nThere is no way to workaround this issue in existing versions of vLLM other than preventing untrusted access to the OpenAI compatible API server.\n\n### References\n\n* https://github.com/mlc-ai/xgrammar/security/advisories/GHSA-389x-67px-mjg3","dates":{"published":"2025-04-15T21:21:04.000Z","modified":"2025-04-15T21:21:04.000Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":6.5,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"OSV · Pypi","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","computed":true,"selection":"version-preference"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"OSV · Pypi","score":6.5,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","exploitability":7.2,"impact":6,"computed":true}]},"epss":{"probability":null,"percentile":null,"severity":"unknown","asOf":null,"change":{"pp":null,"baselineDate":null,"baselineScore":null},"history":[],"last30":[]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[],"affected":[{"vendor":"PyPI","product":"vllm","name":"vllm","label":"vllm","ecosystem":"PyPI","cpePart":null,"purl":"pkg:pypi/vllm","purlType":"pypi","versions":[{"text":"≥ 0.6.5, < 0.8.4","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 0.6.5, < 0.8.4","eol":null,"hubHref":null}],"affectedCount":1,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/mlc-ai/xgrammar/security/advisories/GHSA-389x-67px-mjg3","label":"github.com/mlc-ai/xgrammar/security/advisories/GHSA-389x-67px-mjg3","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/vllm-project/vllm/security/advisories/GHSA-hf3c-wxg2-49q9","label":"github.com/vllm-project/vllm/security/advisories/GHSA-hf3c-wxg2-49q9","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/vllm-project/vllm/pull/16283","label":"github.com/vllm-project/vllm/pull/16283","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/vllm-project/vllm/commit/cb84e45ac75b42ba6795145923e8eb323bb825ad","label":"github.com/vllm-project/vllm/commit/cb84e45ac75b42ba6795145923e8eb323bb825ad","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/vllm-project/vllm","label":"github.com/vllm-project/vllm","hostname":"github.com","tags":["PACKAGE"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":["CGA-Q5W2-6QP4-FFF3"]},"timeline":[{"kind":"published","date":"2025-04-15T21:21:04.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null}],"risk":{"score":26,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-21T10:01:53.573Z","stale":false,"partial":false}}