# CVE-2025-57809: PYSEC-2026-2054 - XGrammar affected by Denial of Service by infinite recursion grammars

Source: https://junglewise.ai/threats/cve-2025-57809-xgrammar-affected-by-denial-of-service-by-infinite-recursion  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-07  
License: CC BY 4.0 with a link back

CVE-2025-57809 · Severity: low · CVSS 3.1 · Published 2026-07-07

XGrammar affected by Denial of Service by infinite recursion grammars

Technologies: [xgrammar (PyPI)](https://junglewise.ai/threats/technologies/xgrammar). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2025-57809 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2025-57809 being exploited in the wild.

**How severe is CVE-2025-57809?** Low severity, with a CVSS score of 3.1, published 7 July 2026.

**Which products and versions are affected?** xgrammar (PyPI) ECOSYSTEM:introduced=0,fixed=0.1.21.

**Is there a fix for CVE-2025-57809?** Yes. xgrammar (PyPI): upgrade to 0.1.21 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2025-57809?** Check whether you run xgrammar (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- xgrammar (PyPI): upgrade to 0.1.21 or later

  ```sh
  pip install "xgrammar>=0.1.21"
  ```


## Affected products

- xgrammar (PyPI) ECOSYSTEM:introduced=0,fixed=0.1.21

## Identifiers

- CVE-2025-57809
- GHSA-5cmr-4px5-23pc
- PYSEC-2026-2054

## Related threats

- [PYSEC-2026-2055 - xgrammar vulnerable to denial of service by huge enum grammar](https://junglewise.ai/threats/cve-2025-58446-xgrammar-vulnerable-to-denial-of-service-by-huge-enum-grammar)
- [mlc-ai xgrammar uncontrolled recursion in nested syntax](https://junglewise.ai/threats/cve-2026-25048-mlc-ai-xgrammar-uncontrolled-recursion-in-nested-syntax)
- [mlc-ai xgrammar unbounded memory cache denial of service](https://junglewise.ai/threats/cve-2025-32381-mlc-ai-xgrammar-unbounded-memory-cache-denial-of-service)
