[Small] Prevent bypassing media domain restriction via HTTP redirects#26035
Merged
simon-mo merged 3 commits intovllm-project:mainfrom Oct 2, 2025
Merged
[Small] Prevent bypassing media domain restriction via HTTP redirects#26035simon-mo merged 3 commits intovllm-project:mainfrom
simon-mo merged 3 commits intovllm-project:mainfrom
Conversation
Signed-off-by: Chenheli Hua <huachenheli@outlook.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request effectively addresses a security concern by introducing a mechanism to prevent bypassing media domain restrictions via HTTP redirects. The implementation adds a new environment variable, VLLM_MEDIA_URL_ALLOW_REDIRECTS, and correctly propagates the allow_redirects flag through the necessary function calls to the underlying HTTP clients. The documentation has also been updated accordingly. I have one suggestion to improve type consistency in the environment variable definition, which will enhance code clarity and maintainability.
Signed-off-by: Chenheli Hua <huachenheli@outlook.com>
Signed-off-by: Chenheli Hua <huachenheli@outlook.com>
DarkLight1337
approved these changes
Oct 2, 2025
Collaborator
|
force merging to unblock release |
simon-mo
pushed a commit
that referenced
this pull request
Oct 2, 2025
…#26035) Signed-off-by: Chenheli Hua <huachenheli@outlook.com> Signed-off-by: simon-mo <simon.mo@hey.com>
pdasigi
pushed a commit
to pdasigi/vllm
that referenced
this pull request
Oct 2, 2025
…vllm-project#26035) Signed-off-by: Chenheli Hua <huachenheli@outlook.com>
yewentao256
pushed a commit
that referenced
this pull request
Oct 3, 2025
…#26035) Signed-off-by: Chenheli Hua <huachenheli@outlook.com> Signed-off-by: yewentao256 <zhyanwentao@126.com>
tomeras91
pushed a commit
to tomeras91/vllm
that referenced
this pull request
Oct 6, 2025
…vllm-project#26035) Signed-off-by: Chenheli Hua <huachenheli@outlook.com> Signed-off-by: Tomer Asida <57313761+tomeras91@users.noreply.github.com>
choprahetarth
pushed a commit
to Tandemn-Labs/vllm
that referenced
this pull request
Oct 11, 2025
…vllm-project#26035) Signed-off-by: Chenheli Hua <huachenheli@outlook.com> Signed-off-by: simon-mo <simon.mo@hey.com>
shyeh25
pushed a commit
to shyeh25/vllm
that referenced
this pull request
Oct 14, 2025
…roject#26035) Signed-off-by: Chenheli Hua <huachenheli@outlook.com> Signed-off-by: simon-mo <simon.mo@hey.com>
lywa1998
pushed a commit
to lywa1998/vllm
that referenced
this pull request
Oct 20, 2025
…vllm-project#26035) Signed-off-by: Chenheli Hua <huachenheli@outlook.com>
alhridoy
pushed a commit
to alhridoy/vllm
that referenced
this pull request
Oct 24, 2025
…vllm-project#26035) Signed-off-by: Chenheli Hua <huachenheli@outlook.com>
rtourgeman
pushed a commit
to rtourgeman/vllm
that referenced
this pull request
Nov 10, 2025
…vllm-project#26035) Signed-off-by: Chenheli Hua <huachenheli@outlook.com>
agrabow
pushed a commit
to agrabow/vllm-fork
that referenced
this pull request
Dec 15, 2025
…vllm-project#26035) Signed-off-by: Chenheli Hua <huachenheli@outlook.com> (cherry picked from commit ad87ba9)
agrabow
pushed a commit
to agrabow/vllm-fork
that referenced
this pull request
Dec 15, 2025
…vllm-project#26035) Signed-off-by: Chenheli Hua <huachenheli@outlook.com> (cherry picked from commit ad87ba9) (cherry picked from commit 1169837)
silverjam
pushed a commit
to YurtsAI/yurts-vllm
that referenced
this pull request
Jan 24, 2026
…dling Port security fixes from upstream PRs vllm-project#25783 and vllm-project#26035 to address SSRF vulnerability in vLLM's multimodal media handling. Security improvements: - Add domain allowlist via --allowed-media-domains CLI parameter - Add VLLM_MEDIA_URL_ALLOW_REDIRECTS environment variable (defaults to disabled) - Implement domain validation before fetching HTTP(S) URLs - Add redirect control to prevent bypassing domain restrictions The fix provides defense-in-depth protection against SSRF attacks while maintaining backward compatibility (empty allowlist permits all domains). Changes: - vllm/envs.py: Add VLLM_MEDIA_URL_ALLOW_REDIRECTS env var - vllm/connections.py: Add allow_redirects parameter to HTTP methods - vllm/multimodal/utils.py: Add domain validation logic - vllm/config/__init__.py: Add allowed_media_domains configuration field - vllm/engine/arg_utils.py: Add --allowed-media-domains CLI argument - vllm/entrypoints/*.py: Wire configuration through entry points - tests/multimodal/test_utils.py: Add security validation tests - test_security_fixes.py: Add standalone security test suite - CVE-2025-6242-IMPLEMENTATION-SUMMARY.md: Implementation documentation References: - CVE-2025-6242 - Upstream PR vllm-project#25783 (domain restriction) - Upstream PR vllm-project#26035 (redirect control)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Addresses comment from Gemini in #25783 to prevent bypassing media domain restriction via HTTP redirects.
Test Plan
VLLM_MEDIA_URL_ALLOW_REDIRECTS=0 CUDA_VISIBLE_DEVICES=7 vllm serve Qwen/Qwen2.5-VL-3B-Instruct --port 8001 --host 0.0.0.0 --dtype bfloat16 --limit-mm-per-prompt '{"image": 1, "video":1}'Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.