Skip to content

[Frontend] Simplify AuthenticationMiddleware path extraction#43426

Merged
vllm-bot merged 1 commit into
vllm-project:mainfrom
russellb:GHSA-94f4-hr76-p5j6
May 22, 2026
Lines changed: 2 additions & 2 deletions
Merged

[Frontend] Simplify AuthenticationMiddleware path extraction#43426
vllm-bot merged 1 commit into
vllm-project:mainfrom
russellb:GHSA-94f4-hr76-p5j6

Conversation

@russellb
Copy link
Copy Markdown
Member

Use scope["path"] directly instead of reconstructing a full URL via
URL(scope=scope).path. The scope path is already available and avoids
an unnecessary round-trip through URL parsing.

Fixes GHSA-94f4-hr76-p5j6

Signed-off-by: Russell Bryant rbryant@redhat.com
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

Use scope["path"] directly instead of reconstructing a full URL via
URL(scope=scope).path. The scope path is already available and avoids
an unnecessary round-trip through URL parsing.

Fixes GHSA-94f4-hr76-p5j6

Signed-off-by: Russell Bryant <rbryant@redhat.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request simplifies path extraction in vllm/entrypoints/openai/server_utils.py by replacing the Starlette URL object with direct access to scope["path"]. Feedback indicates that this change fails to address a potential authentication bypass vulnerability; because scope["path"] is not normalized, an attacker could use multiple leading slashes to circumvent prefix-based security checks. A code suggestion was provided to normalize the path before performing the prefix check.

vllm/entrypoints/openai/server_utils.py
@mgoin mgoin added the ready ONLY add when PR is ready to merge/full CI is needed label May 22, 2026
@tlrmchlsmth tlrmchlsmth enabled auto-merge (squash) May 22, 2026 15:18
@vllm-bot vllm-bot merged commit 2b94d1c into vllm-project:main May 22, 2026
54 of 55 checks passed
h1t35h pushed a commit to h1t35h/vllm that referenced this pull request May 26, 2026
…oject#43426)

Signed-off-by: Russell Bryant <rbryant@redhat.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

None yet

6 participants