NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐍 PyPI
Not in CISA KEV

CVE-2025-57809 — xgrammar

Fix: mlc-ai/xgrammar@b943fea

CVE-2025-57809 is a CWE-674 vulnerability in xgrammar. A fix is available for xgrammar — see the affected versions and patch details below.

XGrammar affected by Denial of Service by infinite recursion grammars

Also known asGHSA-5cmr-4px5-23pcPYSEC-2026-2054
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 7, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2025-57809.

EPSS Exploitation Probability

via FIRST.org ↗
0.5%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs42th percentile — riskier than 42% of all scored CVEsHighest risk
0.00%0.33%0.66%0.99%0.0%0.5%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

1 pkg affected
🐍xgrammar

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

Summary

This issue: http://github.com/mlc-ai/xgrammar/issues/250 should have it's own security advisory. Since several tools accept and pass user supplied grammars to xgrammar, and it is so easy to trigger it seems like a High.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIxgrammarall versions0.1.21pip install --upgrade 'xgrammar==0.1.21'

Affected Products

1 product · 1 configurations
Application
xgrammarmlc-ai
< 0.1.21
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for xgrammar, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update xgrammar to 0.1.21 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2025-57809 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant

This vulnerability is considered Important because it can be exploited remotely, without authentication or user interaction, and directly impacts the availability of systems that rely on xgrammar for structured output parsing. Unlike a Moderate flaw that might require unusual conditions or only cause partial…

Workaround published by Red Hat
Mitigation is either unavailable or does not meet Red Hat Product Security standards for usability, deployment, applicability, or stability.
Source: Red Hat security advisory for CVE-2025-57809 (CC BY 4.0)
ProductFixed inAdvisory
Red Hat Enterprise Linux AI 1.5rhelai1/instructlab-intel-rhel9:1.5.4-1761050413RHSA-2025:19421
Red Hat Enterprise Linux AI 1.5rhelai1/bootc-intel-rhel9:1.5.4-1761060689RHSA-2025:19422
Red Hat Enterprise Linux AI 1.5rhelai1/instructlab-nvidia-rhel9:1.5.4-1761220254RHSA-2025:19423
Red Hat Enterprise Linux AI 1.5rhelai1/bootc-azure-amd-rhel9:1.5.4-1761073793RHSA-2025:19424
Red Hat Enterprise Linux AI 1.5rhelai1/instructlab-amd-rhel9:1.5.4-1761043227RHSA-2025:19425
Red Hat Enterprise Linux AI 1.5rhelai1/bootc-gcp-nvidia-rhel9:1.5.4-1761236079RHSA-2025:19426
Red Hat Enterprise Linux AI 1.5rhelai1/bootc-amd-rhel9:1.5.4-1761064179RHSA-2025:19427
Red Hat Enterprise Linux AI 1.5rhelai1/bootc-nvidia-rhel9:1.5.4-1761228838RHSA-2025:19428

Frequently Asked Questions

### Summary This issue: http://github.com/mlc-ai/xgrammar/issues/250 should have it's own security advisory. Since several tools accept and pass user supplied grammars to xgrammar, and it is so easy to trigger it seems like a High.
O3 Security · Impact-Aware SCA

Is CVE-2025-57809 in your dependencies?

Find it across PyPI, including transitive dependencies.

CVE-2025-57809: xgrammar — Fixed in 0.1.21