GitHub advisory · PyPI
vLLM: Request-controlled mm_processor_kwargs.code_revision allows remote code execution
Description
An untrusted multimodal request can set mm_processor_kwargs.code_revision. When vLLM serves a model whose Hugging Face processor uses dynamic auto_map code and the operator enabled --trust-remote-code, this request value reaches AutoProcessor.from_pretrained and selects the Python revision imported by Transformers.
This lets a client replace the operator-reviewed processor module with code from another revision of the same model repository. The operator-selected model/data revision remains pinned; only the executed processor code changes.
Importing a Python module is arbitrary code execution in the vLLM API/renderer process. The PoC below demonstrates this with an import-time filesystem write. It is fully offline and does not require a GPU, model weights, or changes to a real Hub repository.
vllm-project/vllm570735520942b6428ae98f1eb442c6d88adae55eThe vulnerable path exists when all of the following are true:
auto_map.AutoProcessor code.trust_remote_code.The default trust_remote_code=False configuration is not affected.
mm_processor_kwargs is accepted directly by public request models:
-…
Manual fix · PyPI
pip install --upgrade "vllm>=0.31.0"Sources