🇰🇷 한글 설명
NLTK 라이브러리의 다운로더 구성 요소에서 발생하는 심각한 취약점으로, _unzip_iter 함수가 경로 검증 없이 zipfile.extractall()을 사용하여 발생합니다. 공격자가 악성 ZIP 패키지를 제작하여 배포할 경우, NLTK가 이를 다운로드하고 압축을 해제하는 과정에서 임의의 코드가 실행될 수 있습니다. 이는 시스템 권한 탈취 및 파일 시스템 접근 등 전체 시스템 침해로 이어질 수 있습니다.
💡 쉬운 설명
NLTK라는 도구가 파일을 다운로드할 때 내용물을 제대로 검사하지 않고 압축을 푸는 것이 문제입니다. 나쁜 의도를 가진 파일이 섞여 있으면, 사용자가 모르는 사이에 컴퓨터가 해킹당할 수 있습니다.
🇺🇸 원문 (English)
A critical vulnerability exists in the NLTK downloader component of nltk/nltk, affecting all versions. The _unzip_iter function in nltk/downloader.py uses zipfile.extractall() without performing path validation or security checks. This allows attackers to craft malicious zip packages that, when downloaded and extracted by NLTK, can execute arbitrary code. The vulnerability arises because NLTK assumes all downloaded packages are trusted and extracts them without validation. If a malicious package contains Python files, such as __init__.py, these files are executed automatically upon import, leading to remote code execution. This issue can result in full system compromise, including file system access, network access, and potential persistence mechanisms.
📍 영향받는 시스템
nltk 라이브러리의 모든 버전
⚔️ 공격 벡터
악성 코드가 포함된 ZIP 패키지를 NLTK 다운로더를 통해 다운로드 및 압축 해제 유도
🛡️ 대응 방법
NLTK 라이브러리를 최신 보안 패치가 적용된 버전으로 업데이트하거나, 신뢰할 수 없는 소스의 데이터 다운로드를 차단하십시오.
🔧 검증 코드
출력된 버전 정보가 취약점이 해결된 최신 버전인지 확인하십시오.
pip show nltk | grep Version