CVE-2026-5843: CWE-829: Inclusion of Functionality from Untrusted Control Sphere in Docker Docker Desktop
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.
AI Analysis
Technical Summary
The MLX inference backend in Docker Model Runner on macOS uses the MLX-LM library that unconditionally imports and executes Python files from model directories as specified by the model_file field in config.json. There is no trust_remote_code gate or equivalent safety mechanism, and the MLX backend runs without sandboxing. Consequently, any container on the Docker network can exploit this by calling the model-runner.docker.internal API to pull a malicious model from an attacker-controlled OCI registry and execute arbitrary code on the Docker host with the privileges of the Docker Desktop user.
Potential Impact
Successful exploitation results in arbitrary code execution on the Docker host with the privileges of the Docker Desktop user. This can lead to full compromise of the host environment where Docker Desktop is running. The vulnerability requires local network access to the Docker network and the ability to interact with the model-runner.docker.internal API. There are no known exploits in the wild as of the published date.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or temporary workaround is currently documented. Until a patch is available, restrict access to the Docker network and the model-runner.docker.internal API to trusted users and containers only. Monitor vendor communications for updates on remediation.
CVE-2026-5843: CWE-829: Inclusion of Functionality from Untrusted Control Sphere in Docker Docker Desktop
Description
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.
CVSS v4.0
Score 8.8high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The MLX inference backend in Docker Model Runner on macOS uses the MLX-LM library that unconditionally imports and executes Python files from model directories as specified by the model_file field in config.json. There is no trust_remote_code gate or equivalent safety mechanism, and the MLX backend runs without sandboxing. Consequently, any container on the Docker network can exploit this by calling the model-runner.docker.internal API to pull a malicious model from an attacker-controlled OCI registry and execute arbitrary code on the Docker host with the privileges of the Docker Desktop user.
Potential Impact
Successful exploitation results in arbitrary code execution on the Docker host with the privileges of the Docker Desktop user. This can lead to full compromise of the host environment where Docker Desktop is running. The vulnerability requires local network access to the Docker network and the ability to interact with the model-runner.docker.internal API. There are no known exploits in the wild as of the published date.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or temporary workaround is currently documented. Until a patch is available, restrict access to the Docker network and the model-runner.docker.internal API to trusted users and containers only. Monitor vendor communications for updates on remediation.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- Docker
- Date Reserved
- 2026-04-08T17:43:50.508Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a10b5b4e1370fbb4848af5b
Added to database: 05/22/2026, 19:59:48 UTC
Last enriched: 05/29/2026, 20:27:09 UTC
Last updated: 07/31/2026, 19:22:59 UTC
Views: 113
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.