Miggo Logo

GHSA-w6q7-j642-7c25: vLLM has a Regular Expression Denial of Service (ReDoS, Exponential Complexity) Vulnerability in `pythonic_tool_parser.py`

6.5

CVSS Score
3.1

Basic Information

CVE ID
-
EPSS Score
-
Published
5/28/2025
Updated
5/28/2025
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
vllmpip>= 0.6.4, < 0.9.00.9.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability is a Regular Expression Denial of Service (ReDoS) located in vllm/entrypoints/openai/tool_parsers/pythonic_tool_parser.py. The root cause is a specific complex regular expression, TOOL_CALL_PATTERN, used for parsing tool calls. This pattern, when processed by the standard Python re module, can lead to catastrophic backtracking with certain inputs, causing excessive CPU usage and service denial.

The identified vulnerable function, vllm.entrypoints.openai.tool_parsers.pythonic_tool_parser.PythonicToolParser.parse_tool_calls, directly employs this vulnerable regex. The provided patch (commit 4fc1bf813ad80172c1db31264beaef7d93fe0601) mitigates this by replacing the standard re library with the regex library in pythonic_tool_parser.py (and other files for broader safety). The regex library is designed to handle such complex patterns more efficiently and avoid ReDoS. Therefore, any runtime profile during the exploitation of this specific ReDoS vulnerability would show PythonicToolParser.parse_tool_calls as a key function consuming resources due to the regex matching process.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

## Summ*ry * R**ul*r *xpr*ssion **ni*l o* S*rvi** (R**oS) vuln*r**ility *xists in t** *il* [`vllm/*ntrypoints/op*n*i/tool_p*rs*rs/pyt*oni*_tool_p*rs*r.py`](*ttps://*it*u*.*om/vllm-proj**t/vllm/*lo*/m*in/vllm/*ntrypoints/op*n*i/tool_p*rs*rs/pyt*oni*_

Reasoning

T** vuln*r**ility is * R**ul*r *xpr*ssion **ni*l o* S*rvi** (R**oS) lo**t** in `vllm/*ntrypoints/op*n*i/tool_p*rs*rs/pyt*oni*_tool_p*rs*r.py`. T** root **us* is * sp**i*i* *ompl*x r**ul*r *xpr*ssion, `TOOL_**LL_P*TT*RN`, us** *or p*rsin* tool **lls.