CVE-2025-32381

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.
Configurations

Configuration 1 (hide)

cpe:2.3:a:mlc-ai:xgrammar:*:*:*:*:*:*:*:*

History

17 Sep 2025, 18:14

Type Values Removed Values Added
Summary
  • (es) XGrammar es una librería de código abierto para la generación estructurada eficiente, flexible y portátil. Antes de la versión 0.1.18, Xgrammar incluía una caché para gramáticas compiladas que mejoraba el rendimiento con el uso repetido de la misma gramática. Esta caché se almacena en memoria. Dado que la caché es ilimitada, un sistema que utiliza xgrammar puede ser utilizado de forma abusiva para saturar la memoria del host y provocar una denegación de servicio. Por ejemplo, enviar muchas solicitudes pequeñas a un servidor de inferencia LLM con esquemas JSON únicos podría provocar esta denegación de servicio. Esta vulnerabilidad se corrigió en la versión 0.1.18.
References () https://github.com/mlc-ai/xgrammar/pull/243 - () https://github.com/mlc-ai/xgrammar/pull/243 - Issue Tracking, Patch
References () https://github.com/mlc-ai/xgrammar/security/advisories/GHSA-389x-67px-mjg3 - () https://github.com/mlc-ai/xgrammar/security/advisories/GHSA-389x-67px-mjg3 - Vendor Advisory
References () https://github.com/vllm-project/vllm/pull/16283 - () https://github.com/vllm-project/vllm/pull/16283 - Issue Tracking, Patch
CPE cpe:2.3:a:mlc-ai:xgrammar:*:*:*:*:*:*:*:*
First Time Mlc-ai xgrammar
Mlc-ai

09 Apr 2025, 16:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-04-09 16:15

Updated : 2025-09-17 18:14


NVD link : CVE-2025-32381

Mitre link : CVE-2025-32381

CVE.ORG link : CVE-2025-32381


JSON object : View

Products Affected

mlc-ai

  • xgrammar
CWE
CWE-770

Allocation of Resources Without Limits or Throttling