🇰🇷 한글 설명
Windows ML CLI 0.4.0 미만 버전에서 localhost HTTP API가 인증 없이 노출되고 CORS 설정이 와일드카드로 구성되어 있습니다. 공격자가 악성 웹사이트를 통해 원격 코드를 신뢰하도록 설정하면, 공격자가 제어하는 모델 저장소로부터 파이썬 코드를 실행하여 서버 권한으로 임의 코드를 실행할 수 있습니다.
💡 쉬운 설명
사용자가 악성 웹사이트에 접속하기만 해도, 컴퓨터에 설치된 AI 도구가 공격자의 명령을 실행하게 만들 수 있는 보안 결함입니다. 이를 통해 해커가 사용자의 컴퓨터에서 몰래 악성 프로그램을 실행할 위험이 있습니다.
🇺🇸 원문 (English)
Windows ML CLI is a command line tool for building portable, performant, and high-quality AI models for Windows ML. Prior to 0.4.0, the src/winml/modelkit/serve/cli_api.py component exposes WinML CLI commands through a localhost HTTP API without authentication and configures the allow_origins setting as a wildcard in both src/winml/modelkit/serve/cli_api.py and src/winml/modelkit/serve/app.py. A malicious website loaded by a user can send cross-origin requests to /v1/cli/build or /v1/cli/config and set the trust_remote_code parameter to true, which is converted to the --trust-remote-code command-line flag without validation. This reaches AutoConfig.from_pretrained with trust_remote_code=True in src/winml/modelkit/loader/_autoconfig.py and imports Python code from an attacker-controlled model repository, resulting in arbitrary code execution as the server user. This issue is fixed in version 0.4.0.
📍 영향받는 시스템
Windows ML CLI versions prior to 0.4.0
⚔️ 공격 벡터
사용자가 악성 웹사이트를 방문하여 인증 없는 로컬 HTTP API에 교차 출처 요청(CORS)을 보내는 방식
🛡️ 대응 방법
Windows ML CLI를 0.4.0 이상의 최신 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 0.4.0 미만이면 취약한 상태이며, 0.4.0 이상이면 안전합니다.
pip show winml-cli 2>/dev/null | grep -E 'Version'