CVE-2026-25048 xgrammar: Multi-layer nesting causes DoS
Attackers can cause a segmentation fault and denial of service in xgrammar by providing multi-layer nested syntax inputs.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-25048?
CVE-2026-25048 is a high-severity denial of service vulnerability in mlc-ai xgrammar, published on 5 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
xgrammar is an open-source library for efficient, flexible, and portable structured generation. Prior to version 0.1.32, the multi-level nested syntax caused a segmentation fault (core dumped). This issue has been patched in version 0.1.32.
Weakness: CWE-674
Which versions are affected by CVE-2026-25048?
3 open source packages ship an affected version, including xgrammar. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
xgrammar PyPI | All versions | 0.1.32 |
xgrammar PyPI | All versions | 0.1.32 |
xgrammar PyPI | All versions | 0.1.32 |
Products include Mlc-Ai Xgrammar.
How do I fix CVE-2026-25048?
Upgrade xgrammar to 0.1.32 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2026-25048 being exploited?
There is no known exploitation of CVE-2026-25048 in the wild and no public exploit code.
Other vulnerabilities in mlc-ai xgrammar
Sources
Also known as GHSA-7rgv-gqhr-fxg3, PYSEC-2026-2322.