Medium severity6.5NVD Advisory· Published Apr 9, 2025· Updated Jun 17, 2026
CVE-2025-32381
CVE-2025-32381
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
xgrammarPyPI | < 0.1.18 | 0.1.18 |
Affected products
6- osv-coords5 versionspkg:apk/chainguard/py3.10-vllm-cuda-11.8pkg:apk/chainguard/py3.10-vllm-cuda-12.6pkg:apk/chainguard/py3.10-wheels-vllm-cuda-11.8pkg:apk/chainguard/tritonserver-backend-vllm-24.04pkg:pypi/xgrammar
< 0.8.4-r0+ 4 more
- (no CPE)range: < 0.8.4-r0
- (no CPE)range: < 0.8.4-r0
- (no CPE)range: < 0.8.4-r0
- (no CPE)range: < 24.04-r17
- (no CPE)range: < 0.1.18
Patches
Vulnerability mechanics
References
6- github.com/mlc-ai/xgrammar/pull/243nvdIssue TrackingPatchWEB
- github.com/vllm-project/vllm/pull/16283nvdIssue TrackingPatchWEB
- github.com/advisories/GHSA-389x-67px-mjg3ghsaADVISORY
- github.com/mlc-ai/xgrammar/security/advisories/GHSA-389x-67px-mjg3nvdVendor AdvisoryWEB
- nvd.nist.gov/vuln/detail/CVE-2025-32381ghsaADVISORY
- github.com/pypa/advisory-database/tree/main/vulns/xgrammar/PYSEC-2025-235.yamlghsaWEB
News mentions
0No linked articles in our index yet.