MediumVulnerabilityLLM-specific
GHSA-389x-67px-mjg3: xgrammar Vulnerable to Denial of Service (DoS) by abusing unbounded cache in memory
- Identifiers
- CVE-2025-32381GHSA-389x-67px-mjg3
- Published
- Record updated
- Affected
- xgrammar < 0.1.18
- Fixed in
- 0.1.18
- Known exploitation
- Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
- EPSS
- 0.5%Estimated probability that this CVE is exploited in the next 30 days, from the FIRST Exploit Prediction Scoring System. Read on .
Summary
xgrammar keeps an in-memory cache of compiled grammars that has no size limit. Because of this, an attacker can send many small requests with unique JSON schemas to an LLM inference server and exhaust the host's memory, causing a denial of service. Any system that takes requests from untrusted parties is affected.
Mitigation
The fix adds a size limit to the cache, done in https://github.com/mlc-ai/xgrammar/pull/243. vLLM shows an example of using the new cache size limit: https://github.com/vllm-project/vllm/pull/16283
Affected packages in the Exposure Registry
Matched by package name and ecosystem. Each entry shows whether the package delegates to a language model and how many tracked packages depend on it.
- xgrammarPyPILLM dependency since 2024-11-22, 3 tracked dependents
Related items
- MediumCVE-2026-143823: MLflow denial of service via regex backtracking in skill registration errorsSimilar attack, NVD/CVE Database
- MediumAutonomous AI attack targeted Perplexity to steal cloud credentialsSimilar attack, BleepingComputer
- HighCVE-2026-76813: CKAN MCP Server denial of service through unbounded response decompressionSimilar attack, NVD/CVE Database
- MediumCVE-2026-142225: Bytebase DBHub regular expression denial of service via search_objectsSimilar attack, NVD/CVE Database
- HighCVE-2026-59345: ExtractedTextFormatter denial of service when processing untrusted document textSimilar attack, NVD/CVE Database