# CVE-2025-58446: xgrammar vulnerable to denial of service by huge enum grammar

- Severity: Medium 6.9 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.67%, higher than 53% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-09-05T21:10:06.000Z
- Modified: 2026-09-10T03:50:28.281Z
- Also known as: GHSA-9q5r-wfvf-rr7f, PYSEC-2026-2055
- Weaknesses: CWE-770
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

xgrammar is an open-source library for efficient, flexible, and portable structured generation. A grammar optimizer introduced in 0.1.23 processes large grammars (>100k characters) at very low rates, and can be used for DOS of model providers. This issue is fixed in version 0.1.24.

(As written by CVE List.)

## Affected

- mlc-ai xgrammar: = 0.1.23, <  0.1.24; 0.1.23
- xgrammar (PyPI): from 0.1.23 before 0.1.24

## Every score

- GitHub_M: CVSS:4.0 6.9 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/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`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- PyPA Advisory Database: CVSS:4.0 `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/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`

## References

- <https://github.com/mlc-ai/xgrammar/security/advisories/GHSA-9q5r-wfvf-rr7f> (exploit, vendor-advisory, web)
- <https://github.com/mlc-ai/xgrammar/commit/ced69c3ad2f8f61b516cc278a342e7c644383e27> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-58446> (advisory)
- <https://github.com/mlc-ai/xgrammar> (package)
- <https://pypi.org/project/xgrammar> (package)
- <https://github.com/advisories/GHSA-9q5r-wfvf-rr7f> (advisory)

## Sources

- CVE List: [CVE-2025-58446](https://www.cve.org/CVERecord?id=CVE-2025-58446), CVE Terms of Use, modified 2025-09-08
- GitHub Advisory Database: [GHSA-9q5r-wfvf-rr7f](https://github.com/advisories/GHSA-9q5r-wfvf-rr7f), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2025-58446](https://nvd.nist.gov/vuln/detail/CVE-2025-58446), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-2055](https://osv.dev/vulnerability/PYSEC-2026-2055), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2025-58446 · Whole record: https://cve.day/CVE-2025-58446.json · Rebuilt by cve.day 2026-11-25T22:59:04.308Z
