What’s Vulnerable › Vulnerabilities

CVE-2025-57809: XGrammar affected by Denial of Service by infinite recursion grammars

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.

Affected products

How to fix

Upgrade to a fixed version: mlc-ai xgrammar 0.1.21. Check the vendor advisory for mitigations.

References

Get alerted when CVE-2025-57809 or the next vulnerability affects your stack