# CVE-2026-5843: Docker Model Runner container-to-host code execution via MLX-LM model_file importlib loading

> CVE-2026-5843: Docker Model Runner container-to-host code execution via MLX-LM model_file importlib loading. CVSS 8.2 (CVSS 3.1).

Canonical: https://rewindex.com/cve/CVE-2026-5843
Last updated: 2026-07-23T11:10:00Z

- Published: 2026-05-22 19:28 UTC · Updated: 2026-07-23 11:10 UTC · Assigner: Docker
- CVSS: 8.2 (CVSS 3.1) · Severity: High · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
- EPSS: 0.22%, 13th percentile (scored 2026-10-25)
- CISA KEV: no
- CWE: CWE-829

## 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.

## Affected vendors and products

- Docker: Docker Desktop

## Tracked companies

- [Docker](https://rewindex.com/company/docker.md)

## References

- [CVE record on cve.org](https://www.cve.org/CVERecord?id=CVE-2026-5843)
- [NVD entry](https://nvd.nist.gov/vuln/detail/CVE-2026-5843)
- [https://docs.docker.com/desktop/release-notes/\#4710](https://docs.docker.com/desktop/release-notes/#4710)

---

_Sources: CVE records from the CVE Program (cve.org). CVE® is a registered trademark of The MITRE Corporation. (https://www.cve.org/) This product uses data from the NVD API but is not endorsed or certified by the NVD. (https://nvd.nist.gov/) Known Exploited Vulnerabilities catalog from CISA. (https://www.cisa.gov/known-exploited-vulnerabilities-catalog) EPSS scores from FIRST (Exploit Prediction Scoring System). (https://www.first.org/epss/)_


---
Canonical: https://rewindex.com/cve/CVE-2026-5843 · Markdown: https://rewindex.com/cve/CVE-2026-5843.md · JSON: https://rewindex.com/api/v1/cves/CVE-2026-5843 · Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) · Generated 2026-10-26T03:10:05.101Z
