CVE-2025-32381 Denial of Service by abusing xgrammar unbounded cache in memory
MediumCVSS 6.5
EPSS 0.52%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: partial
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.
Upgrade path
2 packages: 2 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| mlc-ai xgrammar | < 0.1.18; = < 0.1.18 | 0.1.18 | Fixed |
| pypi xgrammar(PyPI) | < 0.1.18; = 0.1.0; = 0.1.1; = 0.1.2 +17 more | 0.1.18 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi xgrammar(PyPI) | < 0.1.18 | 0.1.18 |
| pypi xgrammar(PyPI) | = 0.1.0 | No fix listed |
| pypi xgrammar(PyPI) | = 0.1.1 | No fix listed |
| pypi xgrammar(PyPI) | = 0.1.10 | No fix listed |
| pypi xgrammar(PyPI) | = 0.1.11 | No fix listed |
| pypi xgrammar(PyPI) | = 0.1.12 | No fix listed |
| pypi xgrammar(PyPI) | = 0.1.13 | No fix listed |
| pypi xgrammar(PyPI) | = 0.1.17 | No fix listed |
| pypi xgrammar(PyPI) | = 0.1.6 | No fix listed |
| pypi xgrammar(PyPI) | = 0.1.7 | No fix listed |
| pypi xgrammar(PyPI) | = 0.1.8 | No fix listed |
| pypi xgrammar(PyPI) | = 0.1.9 | No fix listed |
| pypi xgrammar(PyPI) | = 0.1.14 | No fix listed |
| pypi xgrammar(PyPI) | = 0.1.15 | No fix listed |
| pypi xgrammar(PyPI) | = 0.1.16 | No fix listed |
| pypi xgrammar(PyPI) | = 0.1.2 | No fix listed |
| pypi xgrammar(PyPI) | = 0.1.3 | No fix listed |
| pypi xgrammar(PyPI) | = 0.1.4 | No fix listed |
| pypi xgrammar(PyPI) | = 0.1.4rc2 | No fix listed |
| pypi xgrammar(PyPI) | = 0.1.5 | No fix listed |
| pypi xgrammar(PyPI) | = 0.1.5rc1 | No fix listed |
| mlc-ai xgrammar | = < 0.1.18 | No fix listed |
| mlc-ai xgrammar | < 0.1.18 | 0.1.18 |
References
- https://github.com/mlc-ai/xgrammar/security/advisories/GHSA-389x-67px-mjg3 vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- https://github.com/mlc-ai/xgrammar/pull/243 issue-tracking patch
- https://github.com/vllm-project/vllm/pull/16283 issue-tracking patch
- github.com product
- github.com
- github.com