Allocation of Resources Without Limits or Throttling Affecting xgrammar package, versions [,0.1.18)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.04% (13th 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 IDSNYK-PYTHON-XGRAMMAR-9724725
  • published16 Apr 2025
  • disclosed15 Apr 2025
  • creditRussell Bryant

Introduced: 15 Apr 2025

NewCVE-2025-32381  (opens in a new tab)
CWE-1395  (opens in a new tab)
CWE-770  (opens in a new tab)

How to fix?

Upgrade xgrammar to version 0.1.18 or higher.

Overview

xgrammar is an Efficient, Flexible and Portable Structured Generation

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling in thread_safe_cache.h, which can be populated by an indefinitely large number of entries corresponding to each new schema encountered. A user can exhaust all available memory on the system running the target application.

Note: A common use case for this caching is vLLM's guided encoding functionality.

CVSS Base Scores

version 4.0
version 3.1