{"id":"CVE-2025-57809","aliases":["EUVD-2025-28633","GHSA-5cmr-4px5-23pc","PYSEC-2026-2054"],"status":"published","title":"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.","severity":{"version":"4.0","score":7.7,"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","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00485,"percentile":0.42206,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-674"],"published":"2025-08-25T20:43:45Z","modified":"2026-10-28T10:51:16Z","fixes":[{"ecosystem":"PyPI","package":"xgrammar","fixed_in":["0.1.21"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"xgrammar","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.1.21"}]}]},{"source":"osv","ecosystem":"PyPI","package":"xgrammar","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.1.21"}]}],"versions":["0.1.0","0.1.1","0.1.10","0.1.11","0.1.12","0.1.13","0.1.17","0.1.18","0.1.19","0.1.20","0.1.6","0.1.7","0.1.8","0.1.9"]},{"source":"osv","ecosystem":"PyPI","package":"xgrammar","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.1.21"}]}],"versions":["0.1.0","0.1.1","0.1.10","0.1.11","0.1.12","0.1.13","0.1.14","0.1.15","0.1.16","0.1.17","0.1.18","0.1.19","0.1.2","0.1.20","0.1.3","0.1.4","0.1.4rc2","0.1.5","0.1.5rc1","0.1.6","0.1.7","0.1.8","0.1.9"]}],"products":[{"vendor":"mlc-ai","product":"xgrammar"}],"references":[{"url":"https://github.com/mlc-ai/xgrammar/security/advisories/GHSA-5cmr-4px5-23pc","tags":["x_refsource_CONFIRM","Vendor Advisory","advisory","web"]},{"url":"https://github.com/mlc-ai/xgrammar/issues/250","tags":["x_refsource_MISC","Exploit","Issue Tracking","report","web"]},{"url":"https://github.com/mlc-ai/xgrammar/commit/b943feacb5a1caf4d39de8ec3bf7c7ce066dcee5","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-57809","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-5cmr-4px5-23pc","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/57xxx/CVE-2025-57809.json","tags":["advisory"]},{"url":"https://github.com/mlc-ai/xgrammar","tags":["package"]},{"url":"https://pypi.org/project/xgrammar","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2025-57809","title":"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.","status":"published","published":"2025-08-25T21:22:00.226Z","modified":"2025-08-26T20:19:34.998Z","cvss":[{"version":"4.0","score":7.7,"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","level":"high","assessor":"cna"}],"cwes":["CWE-674"],"updated_at":"2026-11-02T14:32:35.099955Z"}],"euvd":[{"id":"EUVD-2025-28633","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.","status":"published","published":"2025-08-25T21:22:00Z","modified":"2025-08-26T20:19:34Z","cvss":[{"version":"4.0","score":7.7,"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","level":"high"}],"updated_at":"2026-11-02T20:31:52.651465Z"}],"ghsa":[{"id":"GHSA-5cmr-4px5-23pc","title":"XGrammar affected by Denial of Service by infinite recursion grammars","description":"### 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.","status":"published","published":"2025-08-25T20:43:45Z","modified":"2025-09-10T21:06:51Z","cvss":[{"version":"4.0","score":7.7,"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","level":"high"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-674"],"updated_at":"2026-11-02T14:38:57.074217Z"}],"nvd":[{"id":"CVE-2025-57809","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.","status":"published","published":"2025-08-25T22:15:33.297Z","modified":"2026-06-17T09:43:28.603Z","cvss":[{"version":"4.0","score":7.7,"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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high","assessor":"secondary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-674"],"updated_at":"2026-11-02T14:11:25.826804Z"}],"osv":[{"id":"CVE-2025-57809","title":"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.","status":"published","published":"2025-08-25T21:22:00.226Z","modified":"2026-10-28T10:51:16.813614572Z","cvss":[{"version":"4.0","score":7.7,"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","level":"high"}],"cwes":["CWE-674"],"updated_at":"2026-11-02T15:44:51.190588Z"},{"id":"GHSA-5cmr-4px5-23pc","title":"XGrammar affected by Denial of Service by infinite recursion grammars","description":"### 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.","status":"published","published":"2025-08-25T20:43:45Z","modified":"2026-09-10T03:50:26.791886216Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"},{"version":"4.0","score":7.7,"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","level":"high"}],"cwes":["CWE-674"],"updated_at":"2026-11-02T15:46:38.213481Z"},{"id":"PYSEC-2026-2054","title":"XGrammar affected by Denial of Service by infinite recursion grammars","description":"### 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.","status":"published","published":"2026-07-07T16:03:01.88104Z","modified":"2026-07-07T17:48:17.630220471Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"},{"version":"4.0","score":7.7,"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","level":"high"}],"updated_at":"2026-11-02T15:52:55.537808Z"}]}}
