CVE-2025-57809
HIGH 7.7CVSS 4.0XGrammar affected by Denial of Service by infinite recursion grammars
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.
- Published
- 25 Aug 2025
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-674
- Also known as
- GHSA-5cmr-4px5-23pcPYSEC-2026-2054
- Sources
- NVDJSONOSV GHSA-5cmr-4px5-23pcJSONOSV PYSEC-2026-2054JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | HIGH 7.7 | 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 |
| OSV | GitHub | CVSS 4.0 | 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 | |
| OSV | PyPA | CVSS 4.0 | 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 | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | PyPA | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | mlc-ai | xgrammarcpe:2.3:a:mlc-ai:xgrammar:*:*:*:*:*:*:*:* |
< 0.1.21 | 0.1.21 |
| OSV | PyPI | xgrammar | < 0.1.21 | 0.1.21 |
References
- https://github.com/mlc-ai/xgrammar/commit/b943feacb5a1caf4d39de8ec3bf7c7ce066dcee5 · Patch, WEB
- https://github.com/mlc-ai/xgrammar/issues/250 · Exploit, Issue Tracking, WEB
- https://github.com/mlc-ai/xgrammar/security/advisories/GHSA-5cmr-4px5-23pc · Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-57809 · ADVISORY
- https://github.com/mlc-ai/xgrammar · PACKAGE
- https://pypi.org/project/xgrammar · PACKAGE
- https://github.com/advisories/GHSA-5cmr-4px5-23pc · ADVISORY
History
- 25 Nov 2026 20:58 UTC · NVD: first stored (published 25 Aug 2025)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Jul 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 25 Aug 2025)