🔍 CVE-2026-31252

5.7
CVSS Score
MEDIUM
2026-05-11
2026-05-12 20:16
✅ 완료

🇰🇷 한글 설명

CosyVoice의 torch.load() 함수가 모델 파일을 로드할 때 weights_only=True 옵션 없이 작동하여, pickle을 통한 임의의 Python 객체 역직렬화가 가능한 취약점이다. 공격자가 악의적으로 조작된 모델 파일을 제공하면, 피해자가 CosyVoice Web UI를 실행할 때 임의의 코드가 자동으로 실행된다.

💡 쉬운 설명

CosyVoice AI 프로그램이 모델 파일을 로드할 때 파일 검증을 제대로 하지 않는다. 악의적인 파일을 프로그램에 입력하면 프로그램 실행 중 그 파일 안의 악성 코드가 자동으로 실행된다.

🇺🇸 원문 (English)

CosyVoice thru commit 6e01309e01bc93bbeb83bdd996b1182a81aaf11e (2025-30-21) contains an insecure deserialization vulnerability (CWE-502) in its model loading component. The framework uses torch.load() to load model weight files (e.g., llm.pt, flow.pt, hift.pt) 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 providing a malicious model directory containing specially crafted model files. When a victim starts the CosyVoice Web UI pointing to this directory, arbitrary code is executed on the victim's system during the model loading process.

📍 영향받는 시스템

CosyVoice commit 6e01309e01bc93bbeb83bdd996b1182a81aaf11e (2025-03-21) 이전 모든 버전

⚔️ 공격 벡터

공격자가 악의적으로 조작된 llm.pt, flow.pt, hift.pt 등 모델 파일을 포함한 디렉토리를 피해자에게 제공하고, CosyVoice Web UI를 해당 디렉토리로 실행하도록 유도

🛡️ 대응 방법

CosyVoice를 최신 버전으로 업그레이드하고 torch.load() 호출 시 weights_only=True 파라미터를 반드시 설정

🔧 검증 코드

시스템의 PyTorch 버전이 weights_only 파라미터를 지원하는지 확인하고, ~/.cache에서 발견된 .pt 파일 개수가 0이면 악의적인 모델 캐시가 없음을 의미한다

Shell / Script
python3 -c "import torch; print('weights_only 지원' if hasattr(torch.load, '__code__') else 'torch 확인 필요')" && find ~/.cache -name '*.pt' 2>/dev/null | wc -l

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L

💻 영향받는 소프트웨어

Python