# CVE-2025-32381: Denial of Service by abusing xgrammar unbounded cache in memory

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- 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.52%, higher than 45% of CVEs (2026-12-01)
- Published: 2025-04-09T13:08:59.000Z
- Modified: 2026-09-10T03:50:57.150Z
- Also known as: GHSA-389x-67px-mjg3, PYSEC-2025-235
- Weaknesses: CWE-770
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

XGrammar is an open-source library for efficient, flexible, and portable structured generation. Prior to 0.1.18, Xgrammar includes a cache for compiled grammars to increase performance with repeated use of the same grammar. This cache is held in memory. Since the cache is unbounded, a system making use of xgrammar can be abused to fill up a host's memory and case a denial of service. For example, sending many small requests to an LLM inference server with unique JSON schemas would eventually cause this denial of service to occur. This vulnerability is fixed in 0.1.18.

(As written by CVE List.)

## Affected

- mlc-ai xgrammar: < 0.1.18; before 0.1.18
- xgrammar (PyPI): before 0.1.18

## Every score

- GitHub_M: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- PyPA Advisory Database: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/mlc-ai/xgrammar/security/advisories/GHSA-389x-67px-mjg3> (advisory, vendor-advisory, web)
- <https://github.com/mlc-ai/xgrammar/pull/243> (fix, issue-tracking, patch, web)
- <https://github.com/vllm-project/vllm/pull/16283> (fix, issue-tracking, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-32381> (advisory)
- <https://github.com/mlc-ai/xgrammar> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/xgrammar/PYSEC-2025-235.yaml> (web)

## Sources

- CVE List: [CVE-2025-32381](https://www.cve.org/CVERecord?id=CVE-2025-32381), CVE Terms of Use, modified 2025-04-09
- GitHub Advisory Database: [GHSA-389x-67px-mjg3](https://github.com/advisories/GHSA-389x-67px-mjg3), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2025-32381](https://nvd.nist.gov/vuln/detail/CVE-2025-32381), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2025-235](https://osv.dev/vulnerability/PYSEC-2025-235), CC-BY-4.0, modified 2026-05-20

---

Page: https://cve.day/CVE-2025-32381 · Whole record: https://cve.day/CVE-2025-32381.json · Rebuilt by cve.day 2026-11-25T22:58:56.311Z
