{"cve":"CVE-2025-32381","nvd":{"published":"2025-04-09T16:15:26.210","modified":"2026-06-17T09:11:54.667","status":"Analyzed","description":"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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5},"cwes":["CWE-770"],"references":["https://github.com/mlc-ai/xgrammar/pull/243","https://github.com/mlc-ai/xgrammar/security/advisories/GHSA-389x-67px-mjg3","https://github.com/vllm-project/vllm/pull/16283"],"products":["mlc-ai:xgrammar"],"source":"nvd","synced_at":"2026-10-19T22:00:57.946988208+00:00"},"epss":{"cve":"CVE-2025-32381","score":0.00507,"percentile":0.43293,"date":"2026-11-01"},"kev":null,"osv":[{"id":"GHSA-389x-67px-mjg3","url":"https://osv.dev/vulnerability/GHSA-389x-67px-mjg3","summary":"xgrammar Vulnerable to Denial of Service (DoS) by abusing unbounded cache in memory","modified":"2026-09-10T03:50:57.150873872Z","packages":[{"ecosystem":"PyPI","name":"xgrammar","purl":"pkg:pypi/xgrammar","ranges":["<0.1.18"],"fixed":["0.1.18"]}]},{"id":"PYSEC-2025-235","url":"https://osv.dev/vulnerability/PYSEC-2025-235","summary":"","modified":"2026-05-20T09:19:24.371536Z","packages":[{"ecosystem":"PyPI","name":"xgrammar","purl":"pkg:pypi/xgrammar","ranges":["<0.1.18"],"fixed":["0.1.18"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}