CVE-2026-55574: vLLM: ReDoS via structured_outputs.regex compiled without timeout in xgrammar and outlines backends
Summary
The structuredoutputs.regex API parameter passes a user-supplied regex string directly to grammar compiler backends with no compilation timeout. In the xgrammar backend, the string reaches compileregex() with no guard. In the outlines backend, validateregexisbuildable() blocks structural issues (lookarounds, backreferences) but provides zero protection against exponential DFA state-space explosion. Patterns like (a+)+b pass all checks and hang the inference worker.
Root Cause
backendxgrammar.py:91 — no timeout: python ctx = self.compiler.compileregex(grammarspec)
backendoutlines.py:299–330 — structural checks only, no complexity analysis: python def validateregexisbuildable(regex: str) -> None: sreparse.parse(regex) # AST parse only — does not detect exponential patterns checkunsupported(...) # blocks lookarounds/backrefs, not nested quantifiers
backendoutlines.py:64 — no timeout: python oc.Index(regexstring, vocabulary.inner)
Impact
Denial of service — one request with an adversarial regex pattern hangs an inference worker indefinitely.
Remediation
Wrap compileregex() and oc.Index() calls in a thread with a deadline (e.g., 5 seconds). Add complexity analysis to validateregexisbuildable() to detect nested quantifier patterns before compilation.
Other sources
vLLM is a high-throughput and memory-efficient inference and serving engine for LLMs. Prior to 0.24.0, the structuredoutputs.regex API parameter passes a user-supplied regular expression string directly to the grammar compiler backends with no compilation timeout; in the xgrammar backend the string reaches the regex compiler with no guard, and in the outlines backend the validation step blocks structural issues such as lookarounds and backreferences but performs no complexity analysis, so a pattern with nested quantifiers passes all checks and causes exponential state-space expansion, allowing a single request containing an adversarial regex to hang an inference worker indefinitely and deny service. This issue is fixed in version 0.24.0.
— NVD
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/vllmto a version that resolves this vulnerability.Fixed in 0.24.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 0.24.0 - Compensating control
In both backends, wrap the regex compilation calls in a thread with a deadline (e.g., 5 seconds): in `backend_xgrammar.py`, wrap `self.compiler.compile_regex(grammar_spec)`; in `backend_outlines.py`, wrap the `oc.Index(regex_string, vocabulary.inner)` call (both are shown as having no timeout in the material).
Event History
Frequently Asked Questions
What is the severity of CVE-2026-55574?
The severity of CVE-2026-55574 is rated at 45, indicating a moderate risk level.
How do I fix CVE-2026-55574?
To fix CVE-2026-55574, update vLLM to version 0.24.0 or later to ensure proper timeout configurations for regex compilation.
What type of vulnerability is CVE-2026-55574?
CVE-2026-55574 is a Regular Expression Denial of Service (ReDoS) vulnerability found in the structured_outputs.regex API.
Who is affected by CVE-2026-55574?
Users of vLLM versions prior to 0.24.0 are impacted by CVE-2026-55574.
What impact does CVE-2026-55574 have on vLLM?
CVE-2026-55574 allows for potential denial of service attacks due to regex compilation without a timeout, affecting system performance.