🇰🇷 한글 설명
Python tarfile 모듈의 extract() 및 extractall() 함수에서 TAR 파일명의 ".." 시퀀스 검증 부족으로 발생하는 디렉토리 트래버설 취약점입니다. 공격자가 악의적인 TAR 파일을 제작하여 사용자가 추출할 때 임의의 위치에 파일을 덮어쓸 수 있습니다.
💡 쉬운 설명
나쁜 사람이 만든 zip 파일 같은 TAR 압축 파일을 열면, ".." 경로를 통해 중요한 시스템 파일을 덮어쓸 수 있습니다. 신뢰할 수 없는 출처의 TAR 파일을 열 때 위험합니다.
🇺🇸 원문 (English)
Directory traversal vulnerability in the (1) extract and (2) extractall functions in the tarfile module in Python allows user-assisted remote attackers to overwrite arbitrary files via a .. (dot dot) sequence in filenames in a TAR archive, a related issue to CVE-2001-1267.
📍 영향받는 시스템
Python 2.5.1 이전, Python 3.0 이전 버전의 tarfile 모듈
⚔️ 공격 벡터
악의적으로 조작된 TAR 파일을 사용자가 extract/extractall 함수로 추출하도록 유도
🛡️ 대응 방법
Python을 2.5.2 이상 또는 3.x 최신 버전으로 업그레이드
🔧 검증 코드
Vulnerable이면 패치 필요, Patched이면 조치됨
python -c "import sys; print('Vulnerable' if sys.version_info < (2,5,2) else 'Patched')"