# CVE-2026-5843: Docker Desktop for macOS Arbitrary Code Execution in MLX Model Runner

Source: https://junglewise.ai/threats/cve-2026-5843-docker-desktop-for-macos-arbitrary-code-execution-in-mlx-model  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-22. Updated: 2026-06-01  
License: CC BY 4.0 with a link back

CVE-2026-5843 · Severity: high · CVSS 8.2 · Published 2026-05-22

Docker Desktop for macOS contains a security flaw in its Model Runner component, which is used to run AI models locally. An attacker can create a malicious AI model that, when loaded, automatically executes hidden code on the user's computer. This could allow an attacker to take control of the system, steal data, or disrupt operations, especially since the malicious code runs with the same permissions as the Docker Desktop user.

Technologies: [Apple macOS](https://junglewise.ai/threats/technologies/macos), [Docker Desktop](https://junglewise.ai/threats/technologies/docker-desktop). Vendors: [Apple](https://junglewise.ai/threats/vendors/apple), [Docker](https://junglewise.ai/threats/vendors/docker).

## Quick answers

**Is CVE-2026-5843 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-5843 being exploited in the wild.

**How severe is CVE-2026-5843?** High severity, with a CVSS score of 8.2, published 22 May 2026.

**Which products and versions are affected?** Docker Docker Desktop 4.56.0 to 4.71.0.

**Is there a fix for CVE-2026-5843?** A patch was published on 2026-06-01: NVD updated with fix version 4.71.0 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-5843 attacked?** It is attacked with local access or over the network, in a network appliance.

**Am I affected by CVE-2026-5843?** Check whether you run Apple macOS or Docker Desktop. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The MLX inference backend in Docker Model Runner for macOS utilizes the MLX-LM library, which is vulnerable to arbitrary code execution. The vulnerability stems from the library unconditionally importing and executing Python files specified in the 'model_file' field of a model's config.json using 'importlib' without a 'trust_remote_code' gate. Because the MLX backend runs without sandboxing on the host, an attacker can achieve code execution as the Docker Desktop user. An attacker can trigger this by hosting a malicious model in an OCI registry and inducing a container on the Docker network to call the 'model-runner.docker.internal' API to pull and run inference on that model. The issue is addressed in Docker Desktop version 4.71.0.

## Affected products

- Docker Docker Desktop 4.56.0 to 4.71.0

## Timeline

- 2026-05-22: disclosed
- 2026-05-22: advisory
- 2026-06-01: patched: NVD updated with fix version 4.71.0

## References

- [https://docs.docker.com/desktop/release-notes/](https://docs.docker.com/desktop/release-notes/)

## Related threats

- [Docker Desktop token logging information disclosure](https://junglewise.ai/threats/cve-2026-123082-docker-desktop-before-version-4-94-0-could-write-the-signed-in)
- [Apple Bluetooth use-after-free vulnerability](https://junglewise.ai/threats/cve-2026-113970-a-use-after-free-issue-was-addressed-with-improved-memory)
- [Apple iOS, iPadOS, macOS, and related platforms rate limit bypass in AirPlay pairing](https://junglewise.ai/threats/cve-2026-113969-a-logic-issue-was-addressed-with-improved-state-management-this)
- [Apple iOS and iPadOS Bluetooth pairing code rate limit bypass](https://junglewise.ai/threats/cve-2026-113968-a-logic-issue-was-addressed-with-improved-state-management-this)
- [Apple iOS/iPadOS Bluetooth pairing bypass](https://junglewise.ai/threats/cve-2026-113965-this-issue-was-addressed-with-improved-checks-this-issue-is)
