{"id":"CVE-2026-5843","state":"PUBLISHED","title":"Docker Model Runner container-to-host code execution via MLX-LM model_file importlib loading","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.\n\nAny 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.","publishedAt":"2026-05-22T19:28:38.857Z","updatedAt":"2026-05-27T03:55:38.188Z","severity":{"score":8.8,"label":"High","version":"4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","source":"Docker"},"assigner":"Docker","products":["Docker Docker Desktop"],"affected":[{"vendor":"Docker","product":"Docker Desktop","defaultStatus":"unaffected","versions":[{"version":"4.56.0","status":"affected","lessThan":"4.71.0","versionType":"semver"}],"platforms":["MacOS"]}],"references":["https://docs.docker.com/desktop/release-notes/#4710"],"weaknesses":["CWE-829"],"ingestedAt":"2026-10-29T20:12:32.778Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/5xxx/CVE-2026-5843.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-5843","state":"PUBLISHED","datePublished":"2026-05-22T19:28:38.857Z","dateUpdated":"2026-05-27T03:55:38.188Z","assignerShortName":"Docker","assignerOrgId":"686469e6-3ff6-451b-ab8b-cf5b9e89401e","dateReserved":"2026-04-08T17:43:50.508Z"},"containers":{"cna":{"title":"Docker Model Runner container-to-host code execution via MLX-LM model_file importlib loading","descriptions":[{"lang":"en","value":"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.\n\nAny 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":[{"vendor":"Docker","product":"Docker Desktop","defaultStatus":"unaffected","versions":[{"version":"4.56.0","status":"affected","lessThan":"4.71.0","versionType":"semver"}],"platforms":["MacOS"]}],"references":[{"url":"https://docs.docker.com/desktop/release-notes/#4710","tags":["release-notes"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"LOW","userInteraction":"NONE","vulnConfidentialityImpact":"HIGH","subConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","subIntegrityImpact":"HIGH","vulnAvailabilityImpact":"HIGH","subAvailabilityImpact":"HIGH","exploitMaturity":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED","version":"4.0","baseSeverity":"HIGH","baseScore":8.8,"vectorString":"CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H"}},{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"version":"3.1","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"REQUIRED","scope":"CHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseSeverity":"HIGH","baseScore":8.2,"vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-829","lang":"en","description":"CWE-829: Inclusion of Functionality from Untrusted Control Sphere","type":"CWE"}]}],"providerMetadata":{"shortName":"Docker","orgId":"686469e6-3ff6-451b-ab8b-cf5b9e89401e","dateUpdated":"2026-05-22T19:28:38.857Z"},"impacts":[{"capecId":"CAPEC-480","descriptions":[{"lang":"en","value":"CAPEC-480 Escaping Virtualization"}]}],"configurations":[{"lang":"en","value":"Docker Model Runner enabled with the MLX inference backend on macOS","supportingMedia":[{"type":"text/html","base64":false,"value":"Docker Model Runner enabled with the MLX inference backend on macOS"}]}],"workarounds":[{"lang":"en","value":"Disable Docker Model Runner or only run trusted containers on Docker Desktop instances where Model Runner is enabled.","supportingMedia":[{"type":"text/html","base64":false,"value":"Disable Docker Model Runner or only run trusted containers on Docker Desktop instances where Model Runner is enabled."}]}],"credits":[{"lang":"en","value":"David Rochester (@davidrxchester)","type":"finder"},{"lang":"en","value":"Nicholas Gould (@gouldnicholas)","type":"finder"}],"source":{"discovery":"EXTERNAL"},"x_generator":{"engine":"Vulnogram 0.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-05-26T00:00:00+00:00","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3","id":"CVE-2026-5843"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-05-27T03:55:38.188Z"}}]}}}