CVE-2025-32381 json
Denial of Service by abusing xgrammar unbounded cache in memory
published 2025-04-09 19 mo ago modified 2026-09-10 1 mo ago also EUVD-2025-10549 , GHSA-389x-67px-mjg3 , PYSEC-2025-235
- cvss
- 6.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.5%
- EPSS 0.5% chance of exploitation in 30 days, percentile 44%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi xgrammar 0.1.18
- mlc-ai xgrammar 0.1.18
- github.com/mlc-ai/xgrammar#243 pull request
- github.com/vllm-project/vllm#16283 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2025-32381 updated cvss 6.5
xgrammar: xgrammar Vulnerable to Denial of Service (DoS) by abusing unbounded cache in memory
-
Red Hat Enterprise Linux AI (RHEL AI) rhelai1/ui-rhel9affected: workaround, no fix available “Fix deferred”
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 19 mo ago
Exploit prediction
0.52% chance of exploitation in the next 30 days, higher than 44% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| OSV | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | xgrammar | <0.1.18 |
0.1.18 |
Affected products
- mlc-ai xgrammar
Classification
- Weakness
-
- CWE-770 Allocation of Resources Without Limits or Throttling
References
-
github.com
/mlc-ai/xgrammar/pull/243
web, issue-tracking, patch
-
github.com
/vllm-project/vllm/pull/16283
web, issue-tracking, patch
-
github.com
/mlc-ai/xgrammar/security/advisories/GHSA-389x-67px-mjg3
web, vendor-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2025-32381
advisory
-
github.com
/mlc-ai/xgrammar
package
-
github.com
/pypa/advisory-database/tree/main/vulns/xgrammar/PYSEC-2025-235.yaml
web
Sources
- CVE List CVE-2025-32381
- GitHub Advisory GHSA-389x-67px-mjg3
- NVD CVE-2025-32381
- OSV PYSEC-2025-235
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.