Infinite Recursion Vulnerability in XGrammar Library by MLC AI
CVE-2025-57809
7.7HIGH
What is CVE-2025-57809?
The XGrammar library, developed by MLC AI, is designed for efficient and flexible structured generation. However, versions prior to 0.1.21 exhibit a serious vulnerability characterized by infinite recursion in the grammar generation process. This flaw can lead to excessive memory consumption, potentially causing applications that utilize this library to crash or behave unpredictably. Users are strongly advised to upgrade to version 0.1.21 or later to mitigate this issue and enhance the stability and security of their applications.
Affected Version(s)
xgrammar < 0.1.21