# xgrammar (PyPI) vulnerabilities

4 known vulnerabilities (2 high, 2 medium), with the versions each affects and the releases that fix them.

## At a glance

- Latest release: 0.2.8 (Sep 24, 2026): no advisory affects it
- Newest unaffected release: 0.2.8 (Sep 24, 2026), the latest release
- Weekly downloads: 1.2M
- Dependents: 133
- Releases: 39 since 0.1.0 (Nov 22, 2024)
- Registry: https://pypi.org/project/xgrammar/
- Releases read: Nov 8, 2026

## Version timeline

Affected versions per advisory, in version order:

- CVE-2026-25048: 0.1.0 to 0.1.31 (0.1.32 is outside it)
- CVE-2025-58446: 0.1.23 (0.1.24 is outside it)
- CVE-2025-57809: 0.1.0 to 0.1.20 (0.1.21 is outside it)
- CVE-2025-32381: 0.1.0 to 0.1.17 (0.1.18 is outside it)

## Advisories (4)

### [CVE-2026-25048](https://cve.now/CVE-2026-25048): xgrammar: Multi-layer nesting causes DoS

- Severity: High 8.7
- Published: Mar 5, 2026
- Affected: fixed in 0.1.32; fixed in 0.1.32.
- Fixed in 0.1.32 (released Mar 4, 2026, 1 day before disclosure).
- The latest release, 0.2.8, is not affected.

### [CVE-2025-58446](https://cve.now/CVE-2025-58446): xgrammar vulnerable to denial of service by huge enum grammar

- Severity: Medium 6.9
- Published: Sep 6, 2025
- Affected: from 0.1.23, fixed in 0.1.24.
- Fixed in 0.1.24 (released Sep 4, 2025, 2 days before disclosure).
- The latest release, 0.2.8, is not affected.

### [CVE-2025-57809](https://cve.now/CVE-2025-57809): XGrammar affected by Denial of Service by infinite recursion grammars

- Severity: High 7.7
- Published: Aug 25, 2025
- Affected: fixed in 0.1.21; fixed in 0.1.21.
- Fixed in 0.1.21 (released Jul 10, 2025, 46 days before disclosure).
- The latest release, 0.2.8, is not affected.

### [CVE-2025-32381](https://cve.now/CVE-2025-32381): Denial of Service by abusing xgrammar unbounded cache in memory

- Severity: Medium 6.5
- Published: Apr 9, 2025
- Affected: fixed in 0.1.18; fixed in 0.1.18.
- Fixed in 0.1.18 (released Apr 8, 2025, 1 day before disclosure).
- The latest release, 0.2.8, is not affected.

---

Source: cve.now
Built by [Sazabi](https://www.sazabi.com/?utm_source=cve-now&utm_medium=markdown), AI-native observability and security: automatic issue detection, plain-language log search and live dashboards.
Page: https://cve.now/packages/pypi/xgrammar
Site guide for agents: https://cve.now/llms.txt
Uses NVD data; not endorsed by NVD.
