CVE-2026-55574: vLLM: ReDoS via structured_outputs.regex compiled without timeout in xgrammar and outlines backends
vLLM before 0.24.0 compiles the user-supplied `structured_outputs.regex` value with no time limit. One request with a pattern like `(a+)+b` can hang an inference worker indefinitely. No login is needed if the API is open. Fixed in vLLM 0.24.0, which adds a compile timeout of 5 seconds by default.
Published Jul 17, 2026 · Analysis Oct 25, 2026
What an attacker can do
The structured_outputs.regex request parameter lets a client force the model's output to match a regular expression. vLLM hands that string to a grammar backend to build a state machine. In the xgrammar backend, backend_xgrammar.py calls compile_regex() directly. In the outlines backend, validate_regex_is_buildable() rejects structural problems such as lookarounds and backreferences, but it cannot spot patterns that blow up the state space, and oc.Index() then runs with no deadline.
A pattern with nested quantifiers, such as (a+)+b, passes the checks and makes compilation run for an extremely long time. The worker that handles it is stuck, and the requests that wait on it stall too. The advisory describes this as one request hanging an inference worker indefinitely. The attacker needs only the ability to call a generation endpoint with structured outputs, and the CVSS vector says no privileges or user interaction. It rates availability impact only, at high.
The practical result is an outage for the shared inference server. Repeating the request keeps it down, and a restart does not help while the attacker keeps sending. No data is leaked and no code runs.
Who is affected
The pip package vllm at any version before 0.24.0. Servers using either the xgrammar or outlines structured-output backend are exposed, as long as a client can send structured_outputs.regex. A server that sits behind authentication limits who can send the request, but any holder of a valid key can still use it.
pip show vllmvllm
- Ecosystem
- PyPI
- Affected
- < 0.24.0
- Fixed in
- 0.24.0
- Check
pip show vllm
How to fix it
Upgrade to vLLM 0.24.0:
pip install --upgrade "vllm>=0.24.0"The fix, pull request 45118, adds a compile_regex_with_timeout() helper in vllm/v1/structured_output/utils.py. It runs compilation in a thread with a deadline, and the xgrammar and outlines backends both use it. The default timeout is 5 seconds. The environment variable VLLM_REGEX_COMPILATION_TIMEOUT_S sets it, and 0 turns the timeout off, so leave it set.
The advisory lists no workaround. Until you upgrade, put authentication in front of the API and consider filtering or rejecting structured_outputs.regex values at a gateway.
How to tell if you were hit
Look for inference workers or engine processes stuck at full CPU on a single request, with requests queueing behind them and no output. Review request logs for structured_outputs with a regex field containing nested quantifiers such as (a+)+, (a*)* or (a|aa)+, especially from one client or key just before the stall.
After the patch, a compile that exceeds the limit fails the request instead of hanging, so errors that name regex compilation and a timeout point to the same abuse. Block or rate-limit the client.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
The structured_outputs.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 compile_regex() with no guard. In the outlines backend, validate_regex_is_buildable() 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
backend_xgrammar.py:91 — no timeout:
ctx = self.compiler.compile_regex(grammar_spec)backend_outlines.py:299–330 — structural checks only, no complexity analysis:
def validate_regex_is_buildable(regex: str) -> None:
sre_parse.parse(regex) # AST parse only — does not detect exponential patterns
_check_unsupported(...) # blocks lookarounds/backrefs, not nested quantifiersbackend_outlines.py:64 — no timeout:
oc.Index(regex_string, vocabulary.inner)Impact
Denial of service — one request with an adversarial regex pattern hangs an inference worker indefinitely.
Remediation
Wrap compile_regex() and oc.Index() calls in a thread with a deadline (e.g., 5 seconds). Add complexity analysis to validate_regex_is_buildable() to detect nested quantifier patterns before compilation.
Credited to brodmart, jperezdealgaba.
Questions
- Does this need authentication?
The CVSS vector lists no privileges required. If your vLLM API is reachable without a key, anyone can send the request. With keys, any holder of a key can.
- Which backends are involved?
Both the xgrammar and outlines structured-output backends. xgrammar calls
compile_regex()with no guard, and outlines checks structure only and builds withoc.Index()with no timeout.- How does 0.24.0 stop it?
Compilation runs in a thread with a deadline, 5 seconds by default.
VLLM_REGEX_COMPILATION_TIMEOUT_Schanges it, and setting it to 0 disables the timeout.- Is it a code execution risk?
No. The advisory describes denial of service only: one request can hang an inference worker.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More vLLM vulnerabilities
All vLLM entriesCVE-2026-114050
vLLM: Forged multimodal UUID + P0/P1 processor-cache eviction drift: unauthenticated remote crash of the whole vLLM engine
medium6.5Oct 23, 2026CVE-2026-114055
vLLM : DoS via unvalidated mm_processor_kwargs in multimodal image processors (Isaac, InternVL, H2OVL, etc.)
high7.5Oct 23, 2026CVE-2026-105752
vLLM: Harmony tool continuations drop `cache_salt` — restoring a cross-tenant prefix-cache membership oracle
low3.1Oct 6, 2026CVE-2026-105753
vLLM: Mirrored multimodal IPC caches desync after a rejected request — a later request reusing the same media hash trips a receiver assertion in the engine core
medium6.5Oct 6, 2026CVE-2026-105754
vLLM: Scale-out disaggregated multimodal transport trusts caller-supplied features
medium6.5Oct 5, 2026CVE-2026-105755
vLLM: Flash late-interaction scoring caches query embeddings under a caller-controlled request id — cross-request integrity break and induced errors on `/score` and `/rerank`
medium4.2Oct 5, 2026
