[Frontend] Require flag for loading text and image embeds#27204
[Frontend] Require flag for loading text and image embeds#27204DarkLight1337 merged 18 commits intomainfrom
Conversation
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
…is not passed Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
|
Documentation preview: https://vllm--27204.org.readthedocs.build/en/27204/ |
There was a problem hiding this comment.
Code Review
This pull request addresses security vulnerabilities GHSA-mrw7-hf4f-83pf and GHSA-pmqf-x6x8-p7qw by introducing --enable-prompt-embeds and --enable-mm-embeds flags. These flags gate the functionality of loading user-provided text and multimodal embeddings, which can be a security risk. The changes are well-implemented across the configuration, core logic, and entrypoints, with checks to ensure the flags are respected. The documentation has been updated with clear warnings, and new tests have been added to verify the behavior. The implementation appears correct and robust. I have not found any issues in this pull request.
Signed-off-by: Russell Bryant <rbryant@redhat.com>
| `prompt_embeds` key. | ||
|
|
||
| WARNING: The vLLM engine may crash if incorrect shape of embeddings is passed. | ||
| Only enable this flag for trusted users!""" |
There was a problem hiding this comment.
Should a shape check be added to the renderer?
There was a problem hiding this comment.
The shape depends on the embedding size of each model so it requires a lot more effort to perform shape validation outside of the model class.
…ct#27204) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Co-authored-by: DarkLight1337 <tlleungac@connect.ust.hk>
…ct#27204) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Co-authored-by: DarkLight1337 <tlleungac@connect.ust.hk> Signed-off-by: 0xrushi <6279035+0xrushi@users.noreply.github.com>
…ct#27204) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Co-authored-by: DarkLight1337 <tlleungac@connect.ust.hk> Signed-off-by: 0xrushi <6279035+0xrushi@users.noreply.github.com>
…ct#27204) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Co-authored-by: DarkLight1337 <tlleungac@connect.ust.hk>
…ct#27204) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Co-authored-by: DarkLight1337 <tlleungac@connect.ust.hk>
…ct#27204) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Co-authored-by: DarkLight1337 <tlleungac@connect.ust.hk>
…ct/vllm#27204) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Co-authored-by: DarkLight1337 <tlleungac@connect.ust.hk> vllm-project/vllm#27204
- vllm-project/vllm#25896 - vllm-project/vllm#27205 - vllm-project/vllm#27204 - vllm-project/vllm#27431 - chat_utils: fix resolve_chat_template_kwargs duplication - vllm-project/vllm#27556 - vllm-project/vllm#25996 - requirements/rocm.txt: pin triton==3.3.0 (from build requirements) - Dockerfile*.ubi: bump base image tag to 9.6-1760340988 - Dockerfile*.ubi: pre-download tiktoken tokenizers (o200k_base) (https://issues.redhat.com/browse/INFERENG-2959) - Dockerfile.ubi: add missing `cuda-cudart-devel` package, required for deepgeemm JITs - vllm-project/vllm#25999 - vllm-project/vllm#26416 Related: neuralmagic/nm-cicd#313
…beddings Port security fix from upstream PR vllm-project#27204 to address DoS vulnerability where users can crash the vLLM engine by passing multimodal embedding inputs with incorrect shapes. Security improvements: - Add --enable-mm-embeds flag requiring explicit opt-in for embedding inputs - Add validation in chat_utils to reject embeddings when flag not set - Add validation in multimodal processing layer - Update enable_prompt_embeds documentation with security warnings - Secure by default (flag defaults to False) The fix prevents DoS attacks by requiring explicit authorization before accepting potentially malformed embedding inputs. Only trusted users should enable this feature. Changes: - vllm/config/__init__.py: Add enable_mm_embeds field and security warnings - vllm/entrypoints/chat_utils.py: Add validation in sync/async parsers - vllm/multimodal/processing.py: Add validation for embedding item types - vllm/engine/arg_utils.py: Add --enable-mm-embeds CLI argument - vllm/entrypoints/llm.py: Add enable_mm_embeds API parameter - test_cve_2025_62372.py: Add comprehensive security validation tests - CVE-2025-62372-IMPLEMENTATION-SUMMARY.md: Implementation documentation References: - CVE-2025-62372 - GHSA-pmqf-x6x8-p7qw - Upstream PR vllm-project#27204 - Upstream commit 58fab50
GHSA-mrw7-hf4f-83pf
GHSA-pmqf-x6x8-p7qw
Issue #26928