High severity · published Sep 6, 2025
CVE-2025-58446
xgrammar vulnerable to denial of service by huge enum grammar
7.5
CVSS
0.6%
EPSS
No
On KEV
Description
xgrammar is an open-source library for efficient, flexible, and portable structured generation. A grammar optimizer introduced in 0.1.23 processes large grammars (>100k characters) at very low rates, and can be used for DOS of model providers. This issue is fixed in version 0.1.24.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
None
Integrity
None
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.6% · higher than 49% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
XG
xgrammar · mlc-ai
= 0.1.23, < 0.1.24 · source: vendor, NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2025-58446
CVE.org
https://www.cve.org/CVERecord?id=CVE-2025-58446
Patch
https://github.com/mlc-ai/xgrammar/commit/ced69c3ad2f8f61b516cc278a342e7c644383e27
Exploit
https://github.com/mlc-ai/xgrammar/security/advisories/GHSA-9q5r-wfvf-rr7f
More from xgrammar
7.5
CVE-2026-25048
xgrammar: Multi-layer nesting causes DoS
7.5
CVE-2025-57809
XGrammar affected by Denial of Service by infinite recursion grammars
6.5
CVE-2025-32381
Denial of Service by abusing xgrammar unbounded cache in memory
