Skip to content
Submit incident
AII-1001-88727
ConfirmedA court, a regulator or the organization itself has stated the core facts, or the record cites a court or regulator source.Supporting sources are pending verification.

Denial of Service via unbounded cache in xgrammar

Xgrammar versions before 0.1.18 contain an unbounded memory cache for compiled grammars that can be abused to cause denial of service by sending many requests with unique JSON schemas. The vulnerability was patched by implementing an LRU cache with a configurable size limit.

8 April 2025 Β· mlc-ai Β· Security and cyberattacks
8 April 2025
AII-1001-88727
Quick facts
Organization
mlc-ai (subject)
Category
Security and cyberattacks
Date
8 April 2025
Drafted by
Raidu Incident Detection

What happened

Xgrammar includes an unbounded cache for compiled grammars held in memory to increase performance with repeated use of the same grammar. Since the cache has no size limit, an attacker sending many requests with unique JSON schemas can fill up a host's memory and cause a denial of service.

The vulnerability affects xgrammar versions prior to 0.1.18. The fix was to add a limit to the cache size, implemented as a policy-based thread cache with an LRU (Least Recently Used) eviction policy.

Reported impact

Any system making use of xgrammar and taking requests as input from potentially untrusted parties would be vulnerable to this denial of service issue. An example of abuse would be sending many small requests to an LLM inference server with unique JSON schemas.

Index analysis

The vulnerability has a CVSS v3 base score of 6.5 (Moderate severity), with network attack vector, low attack complexity, low privileges required, and no user interaction needed. The impact is limited to availability, with no confidentiality or integrity concerns.

Classification

Organization
mlc-ai (subject)
Category
Security and cyberattacks
Industry
IT infrastructure and hosting
Harm status
Potential harm
Intent
Unknown
Timing
Post-deployment
AI systems
xgrammar (mlc-ai)
Regulations
EU AI Act (cited)

Sources and evidence

Sources not yet published

This record was researched and written by the Index from original reporting. Its sources are still being verified by an editor, and they are listed here once that check is complete. Until then the record carries no reviewer.

How sources are verifiedSuggest a source for this incident