CVE-2026-5843·Docker vulnerability
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.
- Severity
- high
- Software
- Docker
- Fixed in
- 4.71.0
- Published
- 2026-05-22
Affected versions
From: 4.56.0
Until: 4.71.0
Fixed in: 4.71.0
How to fix this CVE
Update Docker Desktop to version 4.71.0 or later to patch the unsafe Python code execution vulnerability in the MLX inference backend. The vulnerability allows containers to trigger arbitrary code execution on the host system by loading malicious models from untrusted registries. Immediately upgrade all affected Docker installations, particularly those running Docker Model Runner on macOS with network-accessible inference APIs.
sudo dnf update docker-ce docker-ce-cli --assumeyesDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check Docker version with `docker --version` and compare against 4.56.0–4.70.1 range to identify vulnerable installations
- Step 2: Verify if Model Runner is enabled by checking for docker-compose files or configuration mounting `/var/run/model-runner.docker.internal` socket
- Step 3: Search Docker daemon logs for model-runner API calls: `grep -i 'model-runner\|model_file' /var/lib/docker/containers/*/config.v2.json or journalctl -u docker -g model-runner`
- Step 4: Confirm successful remediation by running `docker --version` and verifying the version is 4.71.0 or later
FAQ
What is CVE-2026-5843?
CVE-2026-5843 is a code execution vulnerability in Docker's MLX inference backend that fails to validate Python files before loading them from model configurations, allowing attackers to execute arbitrary code on the Docker host system.
Is CVE-2026-5843 being actively exploited?
No, CVE-2026-5843 is not currently listed in CISA's Known Exploited Vulnerabilities catalog and has no public exploits available, but the attack surface is significant for organizations running untrusted containerized workloads.
What versions of Docker are affected by CVE-2026-5843?
Docker versions 4.56.0 through 4.70.1 are affected; users should upgrade to 4.71.0 or later to receive the fix.
How do I check if my server is vulnerable to CVE-2026-5843?
Run `docker --version` and check if the version falls between 4.56.0 and 4.70.1. Additionally, verify Model Runner is active by checking if the inference socket is listening with `ls -la /var/run/model-runner.docker.internal 2>/dev/null`.
Does Defensia detect CVE-2026-5843?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Docker is installed on a monitored server, CVE-2026-5843 will appear in your dashboard with remediation steps.
Related Docker CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-5843. Free for 1 server.
Get started free