Vulnerability · Published Sep 6, 2025 · Assigned by GitHub_M

CVE-2025-58446xgrammar vulnerable to denial of service by huge enum grammar

Medium 6.9

In plain English

A medium-severity resource allocation without limits in xgrammar from mlc-ai. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 50% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)6.9Medium
Exploit odds (30 days)0.6%top 50.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

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

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPIxgrammar0.1.24GHSA-9q5r-wfvf-rr7f
PyPIxgrammar0.1.24PYSEC-2026-2055

Affected products (as reported)

VendorProductVersions
mlc-ai xgrammar = 0.1.23, < 0.1.24

Weakness: CWE-770 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

References