🇰🇷 한글 설명
LLaMA-Factory 0.9.5 이하 버전에서 WebUI 접근 권한이 있는 공격자가 악성 모델 경로를 입력하여 임의의 파이썬 코드를 실행할 수 있는 원격 코드 실행(RCE) 취약점이 발견되었습니다. 이 취약점은 사용자 입력값이 검증 없이 trust_remote_code=True 설정과 함께 모델 로딩 함수로 전달되어 발생합니다.
💡 쉬운 설명
LLaMA-Factory의 채팅이나 학습 화면에서 가짜 모델 경로를 입력하면 해커가 서버를 마음대로 조종할 수 있는 보안 결함입니다. 해커가 심어놓은 악성 코드가 모델을 불러오는 과정에서 자동으로 실행되어 서버의 제어권을 탈취할 수 있습니다.
🇺🇸 원문 (English)
LLaMA-Factory through 0.9.5 contains a remote code execution vulnerability that allows attackers with WebUI access to execute arbitrary Python code by supplying a malicious model path in the Chat or Training interfaces. The application passes user-supplied model path input unvalidated into AutoTokenizer.from_pretrained() and AutoModel.from_pretrained() with a hardcoded trust_remote_code=True parameter, causing the Hugging Face transformers library to fetch and execute arbitrary code from a remote or local model repository with the privileges of the server process.
📍 영향받는 시스템
LLaMA-Factory 0.9.5 및 그 이전 버전
⚔️ 공격 벡터
WebUI의 Chat 또는 Training 인터페이스를 통해 검증되지 않은 악성 모델 경로 입력
🛡️ 대응 방법
LLaMA-Factory를 최신 버전으로 업데이트하거나, 신뢰할 수 없는 모델 경로 입력을 차단하도록 설정 변경
🔧 검증 코드
출력된 버전이 0.9.5 이하인지 확인하여 취약 여부를 판단합니다.
pip show llamafactory | grep -E 'Version'