Home » Database

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

Affected or Relevant Artifacts

  • Developer: mlc-ai
  • Deployer: mlc-ai
  • Artifact Details:
TypeName
Systemxgrammar

Impact

AVID Taxonomy Categorization

  • Risk domains: Security
  • SEP subcategories: S0100: Software Vulnerability
  • Lifecycle stages: L06: Deployment

CVSS

Version3.1
Vector StringCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Base Score6.5
Base Severity🟠 Medium
Attack VectorNETWORK
Attack Complexity🟢 Low
Privileges Required🟢 Low
User InteractionNONE
ScopeUNCHANGED
Confidentiality ImpactNONE
Integrity ImpactNONE
Availability Impact🔴 High

CWE

IDDescription
CWE-770CWE-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