🇰🇷 한글 설명
Pandora의 TAR 아카이브 압축 해제 기능에서 경로 탐색(Path Traversal) 취약점이 발견되었습니다. 공격자가 악의적으로 조작된 TAR 파일을 제출하면 압축 해제 시 지정된 디렉토리를 벗어나 시스템 파일을 덮어쓸 수 있으며, 이는 임의 코드 실행이나 서비스 거부로 이어질 수 있습니다.
💡 쉬운 설명
압축 파일을 풀 때 파일 이름에 '상위 폴더로 이동'하는 명령이 포함되어 있어, 원래 풀어야 할 폴더가 아닌 엉뚱한 곳에 파일을 저장할 수 있는 문제입니다. 이를 통해 해커가 중요한 시스템 파일을 망가뜨리거나 컴퓨터를 조종할 위험이 있습니다.
🇺🇸 원문 (English)
Pandora contains a path traversal vulnerability in its TAR archive extraction functionality. When processing a submitted TAR archive, the extractor passed archive member names directly to Python's tarfile.TarFile.extract() without applying an extraction filter.
An attacker able to submit a specially crafted TAR archive containing malicious member paths, such as paths using ../ sequences or absolute paths, could cause extracted files to be written outside the intended extraction directory. This may allow the attacker to overwrite files accessible to the Pandora worker process and could potentially result in application compromise, arbitrary code execution, or denial of service depending on the files targeted and the privileges of the Pandora process.
The vulnerability is corrected by using Python's filter='data' extraction filter, which rejects or sanitizes dangerous TAR members, including paths that escape the destination directory and unsafe link targets.
The weakness corresponds to MITRE's general path traversal category, which includes archive extraction cases where attacker-controlled filenames cause files to be written outside the intended directory.
📍 영향받는 시스템
Pandora (TAR 아카이브 추출 기능 사용 버전)
⚔️ 공격 벡터
악의적으로 조작된 경로(예: ../)가 포함된 TAR 아카이브 파일을 업로드하여 공격
🛡️ 대응 방법
Python의 tarfile.extract() 함수 호출 시 filter='data' 옵션을 적용하여 안전한 추출 필터 사용
🔧 검증 코드
명령어 결과가 'Safe'이면 필터링 기능을 지원하는 환경이며, 'Vulnerable'이면 취약할 수 있는 환경입니다.
python3 -c "import tarfile; print('Safe' if 'filter' in dir(tarfile.TarFile) else 'Vulnerable')"