CVE-2025-57809 Details
Description
XGrammar is an open-source library for efficient, flexible, and portable structured generation. Prior to version 0.1.21, XGrammar has an infinite recursion issue in the grammar. This issue has been resolved in version 0.1.21.
A denial-of-service vulnerability has been identified in XGrammar, an open-source library for structured generation. Prior to version 0.1.21, the library's grammar processing could enter an infinite recursion, causing a segmentation fault. This issue arises from certain grammar rules that create recursive loops, which can be exploited by passing user-defined grammars to XGrammar. The vulnerability has been patched in version 0.1.21.
Users can upgrade to XGrammar version 0.1.21 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Aug 26, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-674 | Uncontrolled Recursion | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| mlc-ai xgrammar | < 0.1.21 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Sep 9, 2025 | Initial Analysis | [email protected] |
| Aug 25, 2025 | New CVE Received | [email protected] |