Docker Model Runner vllm-metal Inference Backend Unconditional Trust in Model Tokenizers Leading to Arbitrary Code Execution

Vulnerability

A vulnerability exists in the vllm-metal inference backend of Docker Model Runner on macOS. The issue arises because the backend automatically sets trust_remote_code=True when loading model tokenizers, without any sandboxing. This behavior allows transformers.AutoTokenizer.from_pretrained() to execute arbitrary Python files from models retrieved from an OCI registry. Consequently, this leads to arbitrary code execution on the Docker host, executed as the Docker Desktop user, whenever inference is performed. The vulnerability can be exploited by any container on the Docker network that calls the model-runner.docker.internal API to fetch a malicious model and request inference.

Impact

Exploitation of this vulnerability allows for arbitrary code execution on the Docker host, as the Docker Desktop user.

Reproduction

To reproduce this vulnerability, load a model from an OCI registry that includes malicious Python files into the vllm-metal inference backend of Docker Model Runner on macOS. The backend will automatically trust the model's tokenizer and execute the malicious code without sandboxing. Once the code is executed, it will run on the Docker host as the Docker Desktop user.

Added: May 26, 2026, 2:37 PM
Updated: May 26, 2026, 2:37 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
2.5
exploitability
2.8
remediation
0.0
relevance
9.1
threat
1.6
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.