🇰🇷 한글 설명
Mamba 언어 모델 프레임워크 2.2.6 이하에서 모델 로드 시 weights_only=True를 사용하지 않아 pickle 역직렬화 취약점이 존재합니다. 공격자는 HuggingFace Hub에 악의적인 모델을 게시하여 사용자가 로드할 때 임의 코드를 실행할 수 있습니다.
💡 쉬운 설명
온라인에서 다운로드한 AI 모델에 숨겨진 악성 코드가 있을 수 있으며, 모델을 로드하는 순간 자동으로 실행됩니다. 소프트웨어를 최신 버전으로 업데이트하면 차단됩니다.
🇺🇸 원문 (English)
The mamba language model framework thru 2.2.6 is vulnerable to insecure deserialization (CWE-502) when loading pre-trained models from HuggingFace Hub. The MambaLMHeadModel.from_pretrained() method uses torch.load() to load the pytorch_model.bin weight file without enabling the security-restrictive weights_only=True parameter. This allows the deserialization of arbitrary Python objects via the pickle module. An attacker can exploit this by publishing a malicious model repository on HuggingFace Hub. When a victim loads a model from this repository, arbitrary code is executed on the victim's system in the context of the mamba process.
📍 영향받는 시스템
mamba-ssm <= 2.2.6
⚔️ 공격 벡터
HuggingFace Hub에 악의적인 pytorch_model.bin이 포함된 모델 저장소 게시 후 사용자가 from_pretrained() 호출 시 공격 실행
🛡️ 대응 방법
mamba-ssm을 2.2.7 이상으로 업그레이드: pip install --upgrade mamba-ssm
🔧 검증 코드
2.2.6 이하 버전이 표시되면 취약하고, 2.2.7 이상이면 패치됨
pip show mamba-ssm 2>/dev/null | grep Version