🇰🇷 한글 설명
macOS용 Docker Model Runner의 vllm-metal 추론 백엔드가 모델 토크나이저를 로드할 때 trust_remote_code=True 설정을 무조건적으로 적용하며 샌드박스 없이 실행됩니다. 이로 인해 OCI 레지스트리에서 가져온 악성 모델에 포함된 임의의 파이썬 코드가 Docker 호스트 사용자의 권한으로 실행될 수 있습니다.
💡 쉬운 설명
나쁜 의도를 가진 모델을 다운로드하면 컴퓨터가 모델을 읽는 과정에서 해커의 명령어를 자동으로 실행하게 됩니다. 네트워크상의 다른 컨테이너를 통해서도 이 공격이 시작될 수 있어 위험합니다.
🇺🇸 원문 (English)
The vllm-metal inference backend in Docker Model Runner on macOS unconditionally sets trust_remote_code=True when loading model tokenizers, and runs without sandboxing. This causes transformers.AutoTokenizer.from_pretrained() to import and execute arbitrary Python files included in any model pulled from an OCI registry, resulting in arbitrary code execution on the Docker host as the Docker Desktop user when inference is triggered.
Any container on the Docker network can trigger this by calling the model-runner.docker.internal API to pull a malicious model and request inference.
📍 영향받는 시스템
macOS 환경의 Docker Model Runner (vllm-metal 백엔드 사용 시)
⚔️ 공격 벡터
네트워크 내 컨테이너가 model-runner.docker.internal API를 호출하여 악성 모델을 로드하고 추론을 요청함
🛡️ 대응 방법
trust_remote_code 설정을 기본적으로 False로 변경하고, 모델 로드 시 샌드박스 환경을 강제 적용하도록 업데이트해야 함
🔧 검증 코드
실행 중인 컨테이너 설정에서 vllm-metal 백엔드 사용 여부를 확인하여 취약한 환경인지 판단합니다.
docker inspect $(docker ps -q) | grep -i 'vllm-metal'