Docker Desktop
Docker Model Runner container-to-host code execution via MLX-LM model_file importlib loading
The MLX inference backend in Docker Model Runner on macOS uses the MLX-LM library, which unconditionally imports and executes arbitrary Python files from model directories via the model_file configuration field in config.json. When a model's config.json specifies a model_file pointing to a Python file, MLX-LM uses importlib to load and execute it with no trust_remote_code gate or equivalent safety check. The MLX backend runs without sandboxing, resulting in arbitrary code execution on the Docker host as the Docker Desktop user. Any container on the Docker network can trigger this by calling the model-runner.docker.internal API to pull a malicious model from an attacker-controlled OCI registry and request inference.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 4.56.0, < 4.71.0
Fixed in 4.71.0
Mitigation
Upgrade Docker Desktop to 4.71.0 or later.
Workaround
Disable Docker Model Runner or only run trusted containers on Docker Desktop instances where Model Runner is enabled.
References
- Release notes docs.docker.com/desktop/release-notes
Timeline
Days relative to CVE publicationFirst public PoC 2.3 days before publication; not in CISA KEV. First PoC: davidrxchester/CVE-2026-5843 (created 20 May 2026, found by us: backfilled).
PoC repositories
Found on GitHub.1 PoCs
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| davidrxchester/CVE-2026-5843 | 20 May 2026 −2.3 d | 0 | PoC |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
PoC characteristics
What to hunt for in your logs · from 1 PoC repoPOST /api/pull
- Body markers
"name":"localhost:5555/evil/model:latest""name":"host.docker.internal:5555/evil/model:latest"inapplication/json- Seen in
- 1 repo: davidrxchester/CVE-2026-5843
- Evidence
- davidrxchester/CVE-2026-5843/README.md:16 davidrxchester/CVE-2026-5843/poc_cve_2026_5843.py:11
POST /engines/mlx/v1/chat/completions
- Body markers
"model":"localhost:5555/evil/model:latest""messages""role":"user""content":"hi""model":"host.docker.internal:5555/evil/model:latest"inapplication/json- Seen in
- 1 repo: davidrxchester/CVE-2026-5843
- Evidence
- davidrxchester/CVE-2026-5843/README.md:20 davidrxchester/CVE-2026-5843/poc_cve_2026_5843.py:14
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/api/pull(?:[?#].*)?$
(?i)^/engines/mlx/v1/chat/completions(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2026-5843 Docker Docker Desktop exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/api/pull"; http.request_body; content:"|22|name|22|:|22|localhost:5555/evil/model:latest|22|"; http.request_body; content:"|22|name|22|:|22|host.docker.internal:5555/evil/model:latest|22|"; reference:url,poc.griffinguard.io/cve/CVE-2026-5843; classtype:web-application-attack; sid:9757684; rev:1;)
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2026-5843 Docker Docker Desktop exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/engines/mlx/v1/chat/completions"; http.request_body; content:"|22|model|22|:|22|localhost:5555/evil/model:latest|22|"; http.request_body; content:"|22|messages|22|"; http.request_body; content:"|22|role|22|:|22|user|22|"; http.request_body; content:"|22|content|22|:|22|hi|22|"; http.request_body; content:"|22|model|22|:|22|host.docker.internal:5555/evil/model:latest|22|"; reference:url,poc.griffinguard.io/cve/CVE-2026-5843; classtype:web-application-attack; sid:9152586; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: Docker Docker Desktop exploit attempt (CVE-2026-5843)
id: gg-pocmon-cve-2026-5843-9757684
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-5843. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-5843
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/api/pull'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2026.5843
title: Docker Docker Desktop exploit attempt (CVE-2026-5843)
id: gg-pocmon-cve-2026-5843-9152586
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-5843. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-5843
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/engines/mlx/v1/chat/completions'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2026.5843