Uncontrolled Recursion Affecting xgrammar package, versions [0.1.31,0.1.32)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.71% (50th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Uncontrolled Recursion vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-XGRAMMAR-15435539
  • published6 Mar 2026
  • disclosed5 Mar 2026
  • creditylwango613

Introduced: 5 Mar 2026

CVE-2026-25048  (opens in a new tab)
CWE-674  (opens in a new tab)

How to fix?

Upgrade xgrammar to version 0.1.32 or higher.

Overview

xgrammar is an Efficient, Flexible and Portable Structured Generation

Affected versions of this package are vulnerable to Uncontrolled Recursion through the handling of multi-level nested grammar rules. An attacker can cause a segmentation fault and crash the application by submitting deeply nested input.

CVSS Base Scores

version 4.0
version 3.1