AVID-2026-R1689
Description
Denial of Service by abusing xgrammar unbounded cache in memory (CVE-2025-32381)
Details
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.
Reason for inclusion in AVID: CVE-2025-32381 describes a Denial of Service in the xgrammar library due to an unbounded in-memory cache, leading to memory exhaustion. This is a software vulnerability in an AI-related library used in ML inference pipelines and AI deployment stacks. It affects components (xgrammar) that can be part of general-purpose AI systems, aligning with software supply-chain concerns for AI stacks (dependencies, runtimes, model-serving/processing pipelines). The report provides sufficient evidence including affected artifacts, the vulnerability mechanism, and a fixed version.
References
- NVD entry
- https://github.com/mlc-ai/xgrammar/security/advisories/GHSA-389x-67px-mjg3
- https://github.com/mlc-ai/xgrammar/pull/243
- https://github.com/vllm-project/vllm/pull/16283
Affected or Relevant Artifacts
- Developer: mlc-ai
- Deployer: mlc-ai
- Artifact Details:
| Type | Name |
|---|---|
| System | xgrammar |
Impact
AVID Taxonomy Categorization
- Risk domains: Security
- SEP subcategories: S0100: Software Vulnerability
- Lifecycle stages: L06: Deployment
CVSS
| Version | 3.1 |
| Vector String | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| Base Score | 6.5 |
| Base Severity | 🟠 Medium |
| Attack Vector | NETWORK |
| Attack Complexity | 🟢 Low |
| Privileges Required | 🟢 Low |
| User Interaction | NONE |
| Scope | UNCHANGED |
| Confidentiality Impact | NONE |
| Integrity Impact | NONE |
| Availability Impact | 🔴 High |
CWE
| ID | Description |
|---|---|
| CWE-770 | CWE-770: Allocation of Resources Without Limits or Throttling |
Other information
- Report Type: Advisory
- Credits:
- Date Reported: 2025-04-09
- Version: 0.3.3
- AVID Entry