NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · vLLM

CVE-2026-73556: vLLM: ReDoS via structured_outputs.regex in the lm-format-enforcer backend (no compile timeout) — missed sibling of GHSA-rwxx-mrjm-wc2m

mediumCVSS 3.1 5.3GHSA-48jh-3gj7-fg8v

vLLM's lm-format-enforcer structured-output backend compiles a user-supplied `structured_outputs.regex` with no timeout. One request with a catastrophic pattern pegs a CPU core and stalls the engine's structured-output path. Only servers set to the `lm-format-enforcer` backend are exposed. Versions below 0.26.0 are affected. Fixed in 0.26.0.

Published Sep 4, 2026 · Analysis Nov 1, 2026

What an attacker can do

An earlier fix, GHSA-rwxx-mrjm-wc2m, wrapped regex compilation in the xgrammar and outlines backends with compile_regex_with_timeout. The lm-format-enforcer backend was missed. In vllm/v1/structured_output/backend_lm_format_enforcer.py, line 110 builds lmformatenforcer.RegexParser(grammar_spec) synchronously, which constructs an interegular FSM from the attacker's regex. Line 155 returns from validation as soon as so_params.regex is set, so nothing checks the pattern.

The reporter measured it: [0-9]{3} compiles in 0.0002 s, while (a{1,300}){300} did not finish in 20 s with one core at 100%. Sending that pattern in structured_outputs.regex to POST /v1/completions never returns, and concurrent requests stall behind it.

vLLM has no authentication by default, so the attacker may need nothing but network access. The precondition is the operator choice --structured-outputs-config '{"backend":"lm-format-enforcer"}'. The default auto selects xgrammar, which is guarded. The effect is availability only (CVSS 5.3).

Who is affected

vLLM below 0.26.0 where the structured-output backend is lm-format-enforcer. Servers on the default auto backend (xgrammar) or the outlines backend were already guarded by the earlier fix. Check the version, then search your launch flags and config for the backend:

pip show vllm

Look for lm-format-enforcer in --structured-outputs-config.

vllm

Ecosystem
PyPI
Affected
< 0.26.0
Fixed in
0.26.0
Check
pip show vllm

How to fix it

Upgrade to vLLM 0.26.0.

pip install --upgrade vllm==0.26.0

Pull request 47595 sends the RegexParser call through compile_regex_with_timeout, as the other backends do, and validates regex patterns early in validate_structured_output_request_lm_format_enforcer. If you cannot upgrade, switch to the default auto or xgrammar backend, or reject structured_outputs.regex at your gateway. The advisory itself lists no workaround.

How to tell if you were hit

Look for a vLLM worker stuck at 100% on one core while requests hang, with a recent structured_outputs request containing nested quantifiers such as (a{1,300}){300}. Check request logs for /v1/completions and chat calls whose regex is long or nested, and for clients whose requests never complete. Confirm whether the backend is lm-format-enforcer in your launch configuration.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

The fix for GHSA-rwxx-mrjm-wc2m ("ReDoS via structured_outputs.regex compiled without timeout") wrapped the regex compile in the xgrammar and outlines backends with compile_regex_with_timeout (and, for outlines, validate_regex_is_buildable). The lm-format-enforcer backend was left unguarded: it compiles the attacker-supplied regex with no timeout and no buildability check. A single request with a catastrophic regex hangs the structured-output compile step and stalls the engine worker (denial of service).

Affected code (HEAD d6d39c1)

vllm/v1/structured_output/backend_lm_format_enforcer.py:

  • line 110: character_level_parser = lmformatenforcer.RegexParser(grammar_spec) — builds an interegular FSM from the attacker regex synchronously, no timeout.
  • line 155: validate_structured_output_request_lm_format_enforcer returns immediately on if so_params.regex: — no validation.

Sibling backends that WERE patched by GHSA-rwxx:

  • backend_xgrammar.py:92 → compile_regex_with_timeout(...).
  • backend_outlines.py:65 → compile_regex_with_timeout(...) (plus validate_regex_is_buildable).

lm-format-enforcer uses the same interegular DFA-construction primitive the advisory cites for the outlines backend.

Reproduction (runtime-verified against the sink)

The sink lmformatenforcer.RegexParser(<regex>) was exercised directly (this is exactly what the backend calls):

baseline  '[0-9]{3}'          -> 0.0002 s
attacker  '(a{1,300}){300}'   -> DID NOT COMPLETE in 20 s (one core pegged at 100% in interegular FSM construction)

End-to-end: start vllm serve <model> --structured-outputs-config '{"backend":"lm-format-enforcer"}', then POST /v1/completions with {"structured_outputs":{"regex":"(a{1,300}){300}"}, ...}. The request never returns; because grammar compile runs in the engine's structured-output path, concurrent requests stall = worker-level DoS. The identical request against the outlines backend is bounded by compile_regex_with_timeout and returns a clean error.

Impact

Unauthenticated denial of service (vLLM ships with no authentication by default). One request pegs a CPU core and blocks the structured-output engine path.

Reachability precondition: the operator must have selected backend=lm-format-enforcer via --structured-outputs-config (the default is auto → xgrammar). This is the same opt-in tier as the outlines backend that GHSA-rwxx already covered.

Suggested remediation

Route the lm-format-enforcer regex compile (backend_lm_format_enforcer.py:110) through the same compile_regex_with_timeout guard already applied to the xgrammar and outlines backends, and reject un-buildable / oversized patterns in validate_structured_output_request_lm_format_enforcer.

Credited to CyberKareem, jperezdealgaba.

Questions

Am I affected if I use the default structured output backend?

Not by this flaw. The default auto picks xgrammar, which already compiles regexes with a timeout. Only the lm-format-enforcer backend is unguarded.

How is CVE-2026-73556 related to GHSA-rwxx-mrjm-wc2m?

It is a missed sibling. That fix guarded the xgrammar and outlines backends, but the lm-format-enforcer compile at backend_lm_format_enforcer.py line 110 was left alone.

Does exploitation require credentials?

The advisory says vLLM ships with no authentication by default, so the attack is unauthenticated unless you set an API key.

Is it exploited in the wild?

No source reports exploitation, and it is not in CISA's KEV catalog.

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 entries