{"id":"CVE-2025-32381","published":"2025-04-09T16:00:10Z","modified":"2025-04-09T20:43:33Z","title":"Denial of Service by abusing xgrammar unbounded cache in memory","vendor":"mlc-ai","product":"xgrammar","tier":"tail","description":{"text":"XGrammar is an open-source library for efficient, flexible, and portable structured generation. Prior to 0.1.18, Xgrammar includes a cache for compiled grammars to increase performance with repeated use of the same grammar. This cache is held in memory. Since the cache is unbounded, a system making use of xgrammar can be abused to fill up a host's memory and case a denial of service. For example, sending many small requests to an LLM inference server with unique JSON schemas would eventually cause this denial of service to occur. This vulnerability is fixed in 0.1.18.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00927,"percentile":0.58782,"provenance":"source"},"cwes":[{"id":"CWE-770","name":"Allocation of Resources Without Limits or Throttling"}],"references":[{"url":"https://github.com/mlc-ai/xgrammar/security/advisories/GHSA-389x-67px-mjg3","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/mlc-ai/xgrammar/pull/243","tags":["x_refsource_MISC"]},{"url":"https://github.com/vllm-project/vllm/pull/16283","tags":["x_refsource_MISC"]}],"priority":{"score":16.3,"factors":[{"name":"EPSS percentile","points":11.76},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"mlc-ai","affectedVersions":[{"vendor":"mlc-ai","product":"xgrammar","versions":["< 0.1.18"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-09T17:26:48.431586Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"xgrammar","vulnerableRanges":["<0.1.18"],"patched":["0.1.18"],"from":["GHSA-389x-67px-mjg3","PYSEC-2025-235"],"provenance":"source"}],"summary":{"text":"The xgrammar library from mlc-ai, used for structured generation, keeps an unbounded in-memory cache of compiled grammars in versions before 0.1.18, so the cache can grow without limit. An attacker with network access and low privileges can exhaust the host's memory and cause a denial of service by sending many small requests with unique JSON schemas, such as to an LLM inference server that uses the library.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:43:35Z"},"euvd":{"id":"EUVD-2025-10549","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2025-32381","published":"2025-04-09","fixed":"0.1.18","kev":false},{"cve":"CVE-2025-57809","published":"2025-08-25","fixed":"0.1.21","kev":false,"link":{"from":"CVE-2025-32381","to":"CVE-2025-57809","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:xgrammar","fromFixed":"0.1.18","toFixed":"0.1.21","daysApart":138}]}},{"cve":"CVE-2025-58446","published":"2025-09-06","fixed":"0.1.24","kev":false},{"cve":"CVE-2026-25048","published":"2026-03-05","fixed":"0.1.32","kev":false}],"package":"PyPI:xgrammar"}}