GHSA-j828-28rj-hfhp: vLLM vulnerable to Regular Expression Denial of Service
Four regular expressions in vLLM 0.6.3 up to 0.9.0 can backtrack catastrophically on crafted input and tie up CPU. They sit in LoRA name handling, the Phi-4-mini tool parser and the streaming chat path. Upgrade to vLLM 0.9.0.
Published May 28, 2025 · Analysis Nov 1, 2026
What an attacker can do
A code review found patterns prone to ReDoS (regular expression denial of service):
vllm/lora/utils.py:r"\((.*?)\)\$?$". Nested input such as((((a|)+)+)+)triggers backtracking.phi4mini_tool_parser.py:r'functools\[(.*?)\]'withre.DOTALL, applied to model output. Many nested or crafted brackets slow it down.serving_chat.py:r'.*"parameters":\s*(.*)', applied tocurrent_text. A very long text with repeated structure is costly.benchmarks/benchmark_serving_structured_output.py:r'\{.*\}'. This is benchmark code, not the server.
The advisory gives no end-to-end exploit. The CVSS vector shows network access, low privileges and low availability impact, and no effect on confidentiality or integrity. In practice an authenticated API user, or content that steers model output into the tool parser, could pin a CPU core in a Python process that serves other users. The effect is slow responses, not a crash or data exposure.
Who is affected
Affected: vLLM from 0.6.3 up to but not including 0.9.0. Check:
pip show vllmThe Phi-4-mini parser matters only if you serve that model with its tool parser. The chat-path regex applies to tool-call streaming. The benchmark script only matters if you run it.
vllm
- Ecosystem
- PyPI
- Affected
- >= 0.6.3, < 0.9.0
- Fixed in
- 0.9.0
- Check
pip show vllm
How to fix it
Upgrade to vLLM 0.9.0:
pip install --upgrade vllm==0.9.0The fix is in pull request 18454. The advisory suggests general mitigations for the code: cap input length, use stricter patterns or structured JSON parsing. It gives no configuration workaround. Until you upgrade, require authentication on the API and set request size limits at your gateway.
How to tell if you were hit
Watch for vLLM processes with sustained high CPU in the Python API server while GPUs sit idle, and for requests that stall without errors. Correlate with unusually long or deeply nested inputs: LoRA adapter names with many parentheses, or long streamed tool-call text. The advisory lists no log line. Beam is not relevant to this server-side flaw.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
A recent review identified several regular expressions in the vllm codebase that are susceptible to Regular Expression Denial of Service (ReDoS) attacks. These patterns, if fed with crafted or malicious input, may cause severe performance degradation due to catastrophic backtracking.
1. vllm/lora/utils.py Line 173
https://github.com/vllm-project/vllm/blob/2858830c39da0ae153bc1328dbba7680f5fbebe1/vllm/lora/utils.py#L173 Risk Description:
- The regex
r"\((.*?)\)\$?$"matches content inside parentheses. If input such as((((a|)+)+)+)is passed in, it can cause catastrophic backtracking, leading to a ReDoS vulnerability. - Using
.*?(non-greedy match) inside group parentheses can be highly sensitive to input length and nesting complexity.
Remediation Suggestions:
- Limit the input string length.
- Use a non-recursive matching approach, or write a regex with stricter content constraints.
- Consider using possessive quantifiers or atomic groups (not supported in Python yet), or split and process before regex matching.
---
2. vllm/entrypoints/openai/tool_parsers/phi4mini_tool_parser.py Line 52
https://github.com/vllm-project/vllm/blob/2858830c39da0ae153bc1328dbba7680f5fbebe1/vllm/entrypoints/openai/tool_parsers/phi4mini_tool_parser.py#L52
Risk Description:
- The regex
r'functools\[(.*?)\]'uses.*?to match content inside brackets, together withre.DOTALL. If the input contains a large number of nested or crafted brackets, it can cause backtracking and ReDoS.
Remediation Suggestions:
- Limit the length of
model_output. - Use a stricter, non-greedy pattern (avoid matching across extraneous nesting).
- Prefer
re.finditer()and enforce a length constraint on each match.
---
3. vllm/entrypoints/openai/serving_chat.py Line 351
https://github.com/vllm-project/vllm/blob/2858830c39da0ae153bc1328dbba7680f5fbebe1/vllm/entrypoints/openai/serving_chat.py#L351
Risk Description:
- The regex
r'.*"parameters":\s*(.*)'can trigger backtracking ifcurrent_textis very long and contains repeated structures. - Especially when processing strings from unknown sources,
.*matching any content is high risk.
Remediation Suggestions:
- Use a more specific pattern (e.g., via JSON parsing).
- Impose limits on
current_textlength. - Avoid using
.*to capture large blocks of text; prefer structured parsing when possible.
---
4. benchmarks/benchmark_serving_structured_output.py Line 650
https://github.com/vllm-project/vllm/blob/2858830c39da0ae153bc1328dbba7680f5fbebe1/benchmarks/benchmark_serving_structured_output.py#L650
Risk Description:
- The regex
r'\{.*\}'is used to extract JSON inside curly braces. If theactualstring is very long with unbalanced braces, it can cause backtracking, leading to a ReDoS vulnerability. - Although this is used for benchmark correctness checking, it should still handle abnormal inputs carefully.
Remediation Suggestions:
- Limit the length of
actual. - Prefer stepwise search for
{and}or use a robust JSON extraction tool. - Recommend first locating the range with simple string search, then applying regex.
Fix
- https://github.com/vllm-project/vllm/pull/18454
---
Credited to kexinoh, russellb, mgoin.
Questions
- Does GHSA-j828-28rj-hfhp have a CVE?
The record carries no CVE id, only the GitHub advisory id. Track it by GHSA-j828-28rj-hfhp.
- Is vLLM 0.8.5 affected?
Yes. The affected range runs from 0.6.3 up to but not including 0.9.0, so 0.8.5 is inside it. Version 0.9.0 is the fix.
- How bad is the impact?
Low. The CVSS score is 4.3 with availability impact only. Expect CPU stalls and slow responses on the affected code path, not code execution or data theft.
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-115911
vLLM: DoS via unbounded chat_template Jinja2 rendering exhausts the renderer thread pool
medium6.5Oct 28, 2026CVE-2026-115912
vLLM: Public multimodal SHM handle forgery reaches worker-side `pickle.loads()` with insecure serialization disabled
high7.5Oct 28, 2026CVE-2026-115913
vLLM: Phi-4 multimodal audio encoder materializes and retains full attention matrices: a single max-length audio OOM-crashes the vLLM engine
medium6.5Oct 28, 2026CVE-2026-115914
vLLM DeepSeek-OCR image processing vulnerable to denial of service
medium6.5Oct 28, 2026CVE-2026-115915
vLLM: Untrusted EPS inputs can trigger denial of service or Ghostscript RCE
high8.1Oct 28, 2026CVE-2026-115916
vLLM: Out-of-vocabulary prompt token id passes input validation and triggers a CUDA device-side assert (engine crash / DoS)
medium6.5Oct 28, 2026
