🇰🇷 한글 설명
InstructLab의 linux_train.py 스크립트에서 HuggingFace 모델 로드 시 trust_remote_code=True가 하드코딩되어 있습니다. 원격 공격자가 악의적인 모델을 배포하여 사용자가 ilab train/download/generate 명령을 실행하도록 유도할 때 임의의 Python 코드를 실행할 수 있으며, 이로 인해 시스템이 완전히 손상될 수 있습니다.
💡 쉬운 설명
InstructLab 프로그램이 인터넷에서 모델을 다운로드할 때 보안 검사를 건너뜁니다. 공격자가 악의적인 코드를 숨긴 모델을 만들어두면, 사용자가 프로그램을 실행할 때 그 코드가 자동으로 실행되어 컴퓨터를 완전히 장악할 수 있습니다.
🇺🇸 원문 (English)
A flaw was found in InstructLab. The `linux_train.py` script hardcodes `trust_remote_code=True` when loading models from HuggingFace. This allows a remote attacker to achieve arbitrary Python code execution by convincing a user to run `ilab train/download/generate` with a specially crafted malicious model from the HuggingFace Hub. This vulnerability can lead to complete system compromise.
📍 영향받는 시스템
InstructLab (모든 패치 적용 전 버전)
⚔️ 공격 벡터
HuggingFace Hub에 악의적인 모델 업로드 후 사용자가 ilab train/download/generate 명령 실행하도록 유도
🛡️ 대응 방법
InstructLab을 최신 버전으로 업데이트하거나 trust_remote_code=False로 설정하도록 패치 적용
🔧 검증 코드
명령이 결과를 반환하면 시스템이 취약하며, 아무 결과도 없으면 패치가 적용된 상태입니다.
grep -r "trust_remote_code=True" ~/.local/lib/python*/site-packages/instructlab/ 2>/dev/null | grep linux_train