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.
The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.