🇰🇷 한글 설명
BabelDOC 0.6.3 미만 버전의 PDF 파서에서 신뢰할 수 없는 pickle 데이터를 역직렬화하는 취약점이 발견되었습니다. 공격자가 조작된 PDF 파일을 통해 경로 탐색을 수행하고 임의의 .pickle.gz 파일을 로드하게 함으로써, BabelDOC 프로세스 권한으로 임의의 파이썬 코드를 실행할 수 있습니다.
💡 쉬운 설명
문서 번역 도구인 BabelDOC이 특수하게 제작된 PDF 파일을 읽을 때, 해커가 심어놓은 악성 명령어를 실행할 수 있는 보안 결함입니다. 이를 통해 해커가 사용자의 컴퓨터에서 몰래 프로그램을 실행할 위험이 있습니다.
🇺🇸 원문 (English)
BabelDOC is a document translation tool. Prior to 0.6.3, BabelDOC's vendored PDF parser in babeldoc/pdfminer/cmapdb.py deserializes untrusted pickle data when CMapDB._load_data() loads CMap files. PDF-controlled Encoding or CMapName values and embedded PostScript usecmap operators can reach this sink after path separators are decoded, while _normalize_cmap_name() removes only a leading slash. Absolute paths or traversal sequences can escape the trusted CMap directories through os.path.join(), select an attacker-writable .pickle.gz file, and cause pickle.loads() to execute arbitrary Python code with the privileges of the BabelDOC process. This issue is fixed in version 0.6.3.
📍 영향받는 시스템
BabelDOC 0.6.3 미만 버전
⚔️ 공격 벡터
조작된 PDF 파일의 CMapName 또는 Encoding 값을 이용한 경로 탐색 및 악성 pickle 파일 로드
🛡️ 대응 방법
BabelDOC을 최신 버전인 0.6.3 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 Version이 0.6.3 미만이면 취약한 상태이며, 0.6.3 이상이면 안전합니다.
pip show babeldoc 2>/dev/null | grep -E 'Version'