Docker Model Runner allows default containers to achieve host code execution
Docker Model Runner’s unauthenticated argument injection lets a stock container gain arbitrary code execution on the host via Docker Extensions
Security & privacy Zero Day Initiative Blog 18 Nov 2026 Attack Real-world evidence
Published as “Hostile Inference: Exploiting Docker Model Runner for Container Escapes”
Why it matters
Local AI tooling in Docker Desktop can be leveraged to break container isolation and execute arbitrary code on the host, undermining the security guarantees developers rely on.
Summary
The researchers discovered an unauthenticated argument-injection endpoint in Docker Model Runner that lets a container supply arbitrary command-line flags to the host-side llama-server process. By abusing file-read/write flags they obtained controlled reads of Docker Desktop logs and writes to the Docker data disk or Extension assets. They then polluted llama-server logs with malicious JavaScript that overwrites an Extension’s UI files, which, when opened by the user, invoke Docker CLI commands to drop and execute a host binary, achieving full code execution on macOS and Windows. The chain was demonstrated on real Docker Desktop installations, and patches have been released.
What they found 3
- A container with default privileges can overwrite the Docker Desktop VM’s data disk via the --log-file flag
“A container created with the default set of privileges could overwrite and corrupt the Docker Desktop VM’s data disk.”
- The unauthenticated DMR REST API is reachable from any container at model-runner.docker.internal
“The DMR REST API is unauthenticated and reachable from any container at the container-internal DNS name model-runner.docker.internal over HTTP.”
- Docker Extensions’ host CLI can be invoked from malicious JavaScript injected into an extension’s index.html
“ddClient.extension.host.cli.exec(cmd, [args...]): invokes an executable located in the extension’s dedicated host/ directory on the host, unsandboxed.”
Caveats 6
- Docker’s response claims the attack scenario falls outside their threat model because it requires a prior container-to-VM escape.
- The exploit requires an installed Docker Extension and the user to open its UI after the malicious inference request.
- Requires a Docker Extension to be installed on the target system.
- The user must trigger the extension UI for the final JavaScript payload to execute.
- On Windows, the attack needs to leak the Docker Desktop username via UNC path or error log.
- The file-write primitive only controls log content, not arbitrary bytes, requiring GGUF metadata or verbose prompts to shape the payload.
What’s new here 4
- Identifies an argument-injection primitive in Docker Model Runner’s _configure endpoint.
- Shows how llama-server flags can be used to read and write host files under the Seatbelt and Job Object sandboxes.
- Demonstrates a full container-to-host escape by corrupting Docker Extension assets via log pollution.
- Provides two additional escape paths: a macOS Seatbelt launchservices bypass and a WSL2 VM-to-host pivot via Extensions.