{"id":"CVE-2025-57809","aliases":["CVE-2025-57809","GHSA-5cmr-4px5-23pc","PYSEC-2026-2054"],"related":[],"kind":"vulnerability","state":"published","title":"XGrammar affected by Denial of Service by infinite recursion grammars","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\nThis issue: http://github.com/mlc-ai/xgrammar/issues/250 should have it's own security advisory. Since several tools accept and pass user supplied grammars to xgrammar, and it is so easy to trigger it seems like a High.","format":"markdown","source":"ghsa"},{"lang":"es","text":"XGrammar es una librería de código abierto para la generación de estructuras eficiente, flexible y portátil. Antes de la versión 0.1.21, XGrammar presentaba un problema de recursión infinita en la gramática. Este problema se ha resuelto en la versión 0.1.21.","source":"nvd"}],"published":"2025-08-25T20:43:45.000Z","modified":"2026-09-10T03:50:26.791Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P","score":7.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P","score":7.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P"}],"cwes":["CWE-674"],"affected":[{"ranges":[{"version":"< 0.1.21","status":"affected"}],"vendor":"mlc-ai","product":"xgrammar","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.1.21"}],"ecosystem":"PyPI","package":"xgrammar","purl":"pkg:pypi/xgrammar","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.1.21"}],"vendor":"mlc-ai","product":"xgrammar","cpe":"cpe:2.3:a:mlc-ai:xgrammar:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.1.21"}],"ecosystem":"PyPI","package":"xgrammar","purl":"pkg:pypi/xgrammar","source":"pysec"}],"references":[{"url":"https://github.com/mlc-ai/xgrammar/security/advisories/GHSA-5cmr-4px5-23pc","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/mlc-ai/xgrammar/issues/250","tags":["exploit","issue-tracking","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/mlc-ai/xgrammar/commit/b943feacb5a1caf4d39de8ec3bf7c7ce066dcee5","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-57809","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/mlc-ai/xgrammar","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/xgrammar","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-5cmr-4px5-23pc","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-08-26T20:19:08.061Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-57809","url":"https://www.cve.org/CVERecord?id=CVE-2025-57809","licence":"CVE Terms of Use","modified":"2025-08-26T20:19:34.998Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5cmr-4px5-23pc","url":"https://github.com/advisories/GHSA-5cmr-4px5-23pc","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:26.791Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-57809","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-57809","licence":"Public domain","modified":"2026-06-17T09:43:28.603Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2054","url":"https://osv.dev/vulnerability/PYSEC-2026-2054","licence":"CC-BY-4.0","modified":"2026-07-07T17:48:17.630Z"}],"updatedAt":"2026-11-25T22:59:03.669Z","epss":{"score":0.00552,"percentile":0.47559,"date":"2026-12-01T12:00:22.000Z"}}