Advisory

PYSEC-2026-2054

Also known as: CVE-2025-57809, GHSA-5cmr-4px5-23pc

Summary

XGrammar affected by Denial of Service by infinite recursion grammars

Details

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.

Severity

High Basis: CVSS v3 score 7.5, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Dates

Published
2026-07-07 16:03 UTC
Modified
2026-07-07 17:48 UTC

Affected packages and fixes

xgrammar

PyPI · All systems

Affected

  • introduced 0, fixed 0.1.21 (ecosystem)

Fixed versions

0.1.21

Fix

  • Fixed version 0.1.21
    pip install --upgrade xgrammar==0.1.21

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences